FolioReader

open class FolioReader : NSObject

Main Library class with some useful constants and methods

  • Present a Folio Reader Container modally on a Parent View Controller.

    Declaration

    Swift

    open func presentReader(parentViewController: UIViewController, withEpubPath epubPath: String, unzipPath: String? = nil, andConfig config: FolioReaderConfig, shouldRemoveEpub: Bool = true, animated:
        Bool = true)

    Parameters

    parentViewController

    View Controller that will present the reader container.

    epubPath

    String representing the path on the disk of the ePub file. Must not be nil nor empty string.

    unzipPath

    Path to unzip the compressed epub.

    config

    FolioReader configuration.

    shouldRemoveEpub

    Boolean to remove the epub or not. Default true.

    animated

    Pass true to animate the presentation; otherwise, pass false.

  • Declaration

    Swift

    public func register(defaults: [String : Any])
  • Check if current theme is Night mode

    Declaration

    Swift

    open var nightMode: Bool { get set }
  • Check current font name. Default .andada

    Declaration

    Swift

    open var currentFont: FolioReaderFont { get set }
  • Check current font size. Default .m

    Declaration

    Swift

    open var currentFontSize: FolioReaderFontSize { get set }
  • Check current audio rate, the speed of speech voice. Default 0

    Declaration

    Swift

    open var currentAudioRate: Int { get set }
  • Check the current highlight style.Default 0

    Declaration

    Swift

    open var currentHighlightStyle: Int { get set }
  • Check the current Media Overlay or TTS style

    Declaration

    Swift

    open var currentMediaOverlayStyle: MediaOverlayStyle { get set }
  • Check the current scroll direction. Default .defaultVertical

    Declaration

    Swift

    open var currentScrollDirection: Int { get set }
  • Declaration

    Swift

    open var currentMenuIndex: Int { get set }
  • Declaration

    Swift

    open var savedPositionForCurrentBook: [String : Any]? { get set }
  • Read Cover Image and Return an UIImage

    Declaration

    Swift

    open class func getCoverImage(_ epubPath: String, unzipPath: String? = nil) throws -> UIImage
  • Declaration

    Swift

    open class func getTitle(_ epubPath: String, unzipPath: String? = nil) throws -> String
  • Declaration

    Swift

    open class func getAuthorName(_ epubPath: String, unzipPath: String? = nil) throws-> String
  • Save Reader state, book, page and scroll offset.

    Declaration

    Swift

    @objc
    open func saveReaderState()
  • Closes and save the reader current instance.

    Declaration

    Swift

    open func close()