PSPDFOutlineViewController
Objective-C
@interface PSPDFOutlineViewController
: PSPDFSearchableTableViewController <PSPDFDocumentInfoController,
UISearchDisplayDelegate,
PSPDFStyleable, PSPDFOverridable>
Swift
class OutlineViewController : SearchableTableViewController, DocumentInfoController, UISearchDisplayDelegate, Styleable, Overridable
Outline (Table of Contents) view controller.
-
Delegate to react when taps are made on outline elements.
Declaration
Objective-C
@property (nonatomic, weak) id<PSPDFOutlineViewControllerDelegate> _Nullable delegate;
Swift
@IBOutlet weak var delegate: OutlineViewControllerDelegate? { get set }
-
Whether the user can long press to copy the title. Defaults to
true
.Declaration
Objective-C
@property (nonatomic) BOOL allowCopy;
Swift
var allowCopy: Bool { get set }
-
Enables displaying page labels. Defaults to
true
.Declaration
Objective-C
@property (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 (nonatomic) NSUInteger maximumNumberOfLines;
Swift
var maximumNumberOfLines: UInt { get set }
-
Left intent width. Defaults to 5.0.
Declaration
Objective-C
@property (nonatomic) CGFloat outlineIndentLeftOffset;
Swift
var outlineIndentLeftOffset: CGFloat { get set }
-
Intent multiplier (will be added x times the intent level). Defaults to 10.0.
Declaration
Objective-C
@property (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
true
.The default implementation of this method returns
false
which is the standard compliant PDF spec behavior.Declaration
Objective-C
@property (nonatomic, readonly) BOOL shouldExpandCollapseOnRowSelection;
Swift
var shouldExpandCollapseOnRowSelection: Bool { get }
-
Cell delegate - expand/shrink content.
Declaration
Objective-C
- (void)outlineCellDidTapDisclosureButton:(nonnull PSPDFOutlineCell *)cell;
Swift
func outlineCellDidTapDisclosureButton(_ cell: OutlineCell)
-
The search controller used to search the outline.
Declaration
Objective-C
@property (nonatomic, readonly) UISearchController *_Nonnull searchController;
Swift
var searchController: UISearchController { get }