PTBookmarkViewController


@interface PTBookmarkViewController : UITableViewController <PTOverridable>

The PTBookmarkViewController displays a list of user-created bookmarks in a document being viewed by a PTPDFViewCtrl.

  • An object that conforms to the PTBookmarkViewControllerDelegate protocol.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<PTBookmarkViewControllerDelegate> delegate;

    Swift

    weak var delegate: PTBookmarkViewControllerDelegate? { get set }
  • Returns a new instance of a PTBookmarkViewController.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithPDFViewCtrl:
        (nonnull PTPDFViewCtrl *)pdfViewCtrl;

    Swift

    init(pdfViewCtrl: PTPDFViewCtrl)
  • Returns a new instance of a PTBookmarkViewController.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithToolManager:
        (nonnull PTToolManager *)toolManager;

    Swift

    convenience init(toolManager: PTToolManager)
  • Add/remove the bookmark for a page.

    Declaration

    Objective-C

    - (BOOL)toggleBookmarkForPageNumber:(int)pageNumber;

    Swift

    func toggleBookmark(forPageNumber pageNumber: Int32) -> Bool

    Parameters

    pageNumber

    The number of the page to be toggled.

    Return Value

    Whether the page has bookmark after toggling.

  • Check whether a page has bookmark.

    Declaration

    Objective-C

    - (BOOL)hasBookmarkAtPageNumber:(int)pageNumber;

    Swift

    func hasBookmark(atPageNumber pageNumber: Int32) -> Bool

    Parameters

    pageNumber

    The number of the page.

    Return Value

    Whether the page has bookmark.

  • User bookmarks

    Declaration

    Objective-C

    @property (nonatomic, strong) NSMutableArray<PTUserBookmark *> *_Nonnull bookmarks;

    Swift

    var bookmarks: NSMutableArray { get set }
  • Whether bookmarks are considered readonly and cannot be modified or deleted. The default value is NO, meaning that bookmarks can be modified and deleted.

    Note

    The PTToolManager.readonly property is also consulted when determing if bookmarks can be modified or deleted. When PTToolManager.readonly is set to YES that property takes precedence over this property’s value.

    Declaration

    Objective-C

    @property (nonatomic, getter=isReadonly) BOOL readonly;

    Swift

    var isReadonly: Bool { get set }
  • Whether the text of newly created bookmarks is immediately editable. The default value is NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL bookmarksEditableOnCreation;

    Swift

    var bookmarksEditableOnCreation: Bool { get set }