BooksLibraryEventListener

public protocol BooksLibraryEventListener : AnyObject

Analytics events describing navigation in the library and in an epub.

  • Called when either the user or the host selects a tab in the library UI.

    Declaration

    Swift

    func didSelectLibraryTab(_ tab: LibraryTab)
  • Called when the user opens the details view for a book.

    Declaration

    Swift

    func didOpenBookDetailsView(book: Book)
  • Called when the user navigates to a page in an epub.

    Page count depends on book layout, which depends on the device orientation, font size etc.

    Note that the didChangePage event is fired only after the whole book has been laid out, as that is when the final page count will be known.

    Declaration

    Swift

    func didChangePage(book: Book, currentPage: Int, pageCount: Int)