PSPDFOutlineViewController


@interface PSPDFOutlineViewController
    : PSPDFSearchableTableViewController <
          PSPDFDocumentInfoController, UISearchDisplayDelegate, PSPDFStyleable>

Outline (Table of Contents) view controller.

  • Delegate to react when taps are made on outline elements.

    Declaration

    Objective-C

    @property (readwrite, nonatomic)
        id<PSPDFOutlineViewControllerDelegate> _Nullable delegate;

    Swift

    @IBOutlet weak var delegate: PSPDFOutlineViewControllerDelegate? { get set }
  • Allow to long-press to copy the title. Defaults to YES.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL allowCopy;

    Swift

    var allowCopy: Bool { get set }
  • Enables displaying page labels. Defaults to YES.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL showPageLabels;

    Swift

    var showPageLabels: Bool { get set }
  • How many lines of text should be displayed for each cell. Defaults to 4. Set to 0 for unlimited lines.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSUInteger maximumNumberOfLines;

    Swift

    var maximumNumberOfLines: UInt { get set }
  • Left intent width. Defaults to 5.f.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat outlineIntentLeftOffset;

    Swift

    var outlineIntentLeftOffset: CGFloat { get set }
  • Intent multiplier (will be added x times the intent level). Defaults to 10.f.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat outlineIndentMultiplier;

    Swift

    var outlineIndentMultiplier: CGFloat { get set }
  • Outline elements with child elements can also contain a PDF action. Elements with an assigned action will trigger the action. Elements without an assigned action will just expand/collapse the element. This duality can create a confusing user experience.

    Ideally this is controlled at the PDF authoring stage, however you can also permanently disable invoking actions on non-leave nodes by overriding this method and returning YES.

    The default implementation of this method returns NO which is the standard compliant PDF spec behavior.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL shouldExpandCollapseOnRowSelection;

    Swift

    var shouldExpandCollapseOnRowSelection: Bool { get }
  • Cell delegate - expand/shrink content.

    Declaration

    Objective-C

    - (void)outlineCellDidTapDisclosureButton:(nonnull PSPDFOutlineCell *)cell;

    Swift

    func outlineCellDidTapDisclosureButton(_ cell: PSPDFOutlineCell)
  • The search controller used to search the outline.

    Declaration

    Objective-C

    @property (readonly, nonatomic) UISearchController *_Nonnull searchController;

    Swift

    var searchController: UnsafeMutablePointer