PTOutlineViewControllerDelegate

@protocol PTOutlineViewControllerDelegate <NSObject>

The methods declared by the PTOutlineViewControllerDelegate protocol allow the adopting delegate to respond to messages from the PTOutlineViewController class.

  • Tells the delegate that an outline item was selected. Note that the PDF specification refers to outline items as “bookmarks”, which are not user bookmarks. The PTBookmark and related classes refer to outline items, not user bookmarks.

    Declaration

    Objective-C

    - (void)outlineViewController:
                (nonnull PTOutlineViewController *)outlineViewController
                 selectedBookmark:(nonnull NSDictionary *)bookmark;

    Swift

    optional func outlineViewController(_ outlineViewController: PTOutlineViewController, selectedBookmark bookmark: [AnyHashable : Any])

    Parameters

    outlineViewController

    The PTOutlineViewController object informing the delegate about the bookmark’s selection.

    bookmark

    A dictionary of bookmark information, with key-value pairs: {KEY_TITLE, NSString holding the bookmark’s title}, {KEY_CHILDREN, NSNumber with a BOOL value indicating the presence of children at this node}, {KEY_BOOKMARK, PTBookmark that’s the next bookmark}.

  • Asks the delegate if the outline item should be collapsed by default. Note that the PDF specification refers to outline items as “bookmarks”, which are not user bookmarks. The PTBookmark and related classes refer to outline items, not user bookmarks.

    Declaration

    Objective-C

    - (BOOL)outlineViewController:
                (nonnull PTOutlineViewController *)outlineViewController
        bookmarkCollapsedByDefault:(nonnull PTBookmark *)bookmark;

    Swift

    optional func outlineViewController(_ outlineViewController: PTOutlineViewController, bookmarkCollapsedByDefault bookmark: PTBookmark) -> Bool

    Parameters

    outlineViewController

    The PTOutlineViewController object asking the delegate about the bookmark’s default collapsed state.

    bookmark

    A PTBookmark refering to the outline item.

  • Tells the delegate that the outline control wants to be closed.

    Declaration

    Objective-C

    - (void)outlineViewControllerDidCancel:
        (nonnull PTOutlineViewController *)outlineViewController;

    Swift

    optional func outlineViewControllerDidCancel(_ outlineViewController: PTOutlineViewController)