FolioReaderCenter

open class FolioReaderCenter : UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout

The base reader class

  • Declaration

    Swift

    required public init?(coder aDecoder: NSCoder)
  • Enable or disable the scrolling between chapters (FolioReaderPages). If this is enabled it’s only possible to read the current chapter. If another chapter should be displayed is has to be triggered programmatically with changePageWith.

    Declaration

    Swift

    open func enableScrollBetweenChapters(scrollEnabled: Bool)

    Parameters

    scrollEnabled

    Bool which enables or disables the scrolling between FolioReaderPages.

  • Declaration

    Swift

    open func numberOfSections(in collectionView: UICollectionView) -> Int
  • Declaration

    Swift

    open func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int
  • Declaration

    Swift

    open func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell
  • Declaration

    Swift

    public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
  • Declaration

    Swift

    override open func willRotate(to toInterfaceOrientation: UIInterfaceOrientation, duration: TimeInterval)
  • Declaration

    Swift

    override open func didRotate(from fromInterfaceOrientation: UIInterfaceOrientation)
  • Declaration

    Swift

    override open func willAnimateRotation(to toInterfaceOrientation: UIInterfaceOrientation, duration: TimeInterval)
  • Changes the current page of the reader.

    Declaration

    Swift

    public func changePageWith(page: Int, animated: Bool = false, completion: (() -> Void)? = nil)

    Parameters

    page

    The target page index. Note: The page index starts at 1 (and not 0).

    animated

    En-/Disables the animation of the page change.

    completion

    A Closure which is called if the page change is completed.