FolioReaderCenterDelegate

@objc
public protocol FolioReaderCenterDelegate : AnyObject

Protocol which is used from FolioReaderCenters.

  • Notifies that a page appeared. This is triggered when a page is chosen and displayed.

    Declaration

    Swift

    @objc
    optional func pageDidAppear(_ page: FolioReaderPage)

    Parameters

    page

    The appeared page

  • Passes and returns the HTML content as String. Implement this method if you want to modify the HTML content of a FolioReaderPage.

    Declaration

    Swift

    @objc
    optional func htmlContentForPage(_ page: FolioReaderPage, htmlContent: String) -> String

    Parameters

    page
    htmlContent

    The current HTML content as String.

    Return Value

    The adjusted HTML content as String. This is the content which will be loaded into the given FolioReaderPage.

  • Notifies that a page changed. This is triggered when collection view cell is changed.

    Declaration

    Swift

    @objc
    optional func pageItemChanged(_ pageNumber: Int)

    Parameters

    pageNumber

    The appeared page item