PTDocumentController
@interface PTDocumentController
: PTDocumentBaseViewController <PTOverridable, PTToolGroupManagerDelegate,
PTToolGroupToolbarDelegate>
A view controller that displays a PTPDFViewCtrl along with other controls.
-
The document controller’s delegate object.
Declaration
Objective-C
@property (nonatomic, weak, nullable) id<PTDocumentControllerDelegate> delegate;Swift
weak var delegate: (any PTDocumentControllerDelegate)? { get set }
-
Whether tool groups are enabled in this view controller. This property controls whether the
toolGroupToolbaris shown.The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=areToolGroupsEnabled) BOOL toolGroupsEnabled;Swift
var areToolGroupsEnabled: Bool { get set } -
The tool group manager instance used to control the current tool group and the set of bar button items displayed in the tool group toolbar.
Declaration
Objective-C
@property (nonatomic, strong, readonly) PTToolGroupManager *_Nonnull toolGroupManager;Swift
var toolGroupManager: PTToolGroupManager { get }
-
The tool group toolbar used by this class when the
areToolGroupsEnabledproperty is enabled.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTToolGroupToolbar *_Nonnull toolGroupToolbar;Swift
var toolGroupToolbar: PTToolGroupToolbar { get } -
Whether the
isToolGroupToolbarHiddenproperty of this view controller is updated as part of its bar-hiding (and -showing) behavior.When enabled, the
isToolGroupToolbarHiddenproperty will be updated by thecontrolsHiddenproperty in response to handled taps, automatically based on a timer, and other logic. Otherwise, theisToolGroupToolbarHiddenproperty will not be updated and it is the responsibility of users of this class to ensure that the bars are consistent with the desired behavior and appearance.The default value of this property is
YES.See
isToolGroupToolbarHiddenDeclaration
Objective-C
@property (nonatomic) BOOL hidesToolGroupToolbar;Swift
var hidesToolGroupToolbar: Bool { get set } -
Whether the tool group toolbar is hidden.
The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isToolGroupToolbarHidden) BOOL toolGroupToolbarHidden;Swift
var isToolGroupToolbarHidden: Bool { get set } -
Sets whether the tool group toolbar is hidden.
See
isToolGroupToolbarHiddenDeclaration
Objective-C
- (void)setToolGroupToolbarHidden:(BOOL)hidden animated:(BOOL)animated;Swift
func setToolGroupToolbarHidden(_ hidden: Bool, animated: Bool)Parameters
hiddenSpecify
YESto hide the tool group toolbar orNOto show it.animatedSpecify
YESif you want to animate the change in visibility orNOif you want the control to appear immediately.
-
The tool group indicator view is used to indicate the current tool group.
Declaration
Objective-C
@property (nonatomic, strong, readonly) PTToolGroupIndicatorView *_Nonnull toolGroupIndicatorView;Swift
var toolGroupIndicatorView: PTToolGroupIndicatorView { get }
-
The tool group view controller displays the list of available tool groups and allows the user to change the current mode.
Declaration
Objective-C
@property (nonatomic, strong, readonly) PTToolGroupViewController *_Nonnull toolGroupViewController;Swift
var toolGroupViewController: PTToolGroupViewController { get } -
Shows the
toolGroupViewController.Declaration
Objective-C
- (void)showToolGroups:(nonnull id)sender;Swift
func showToolGroups(_ sender: Any) -
The tool group defaults view controller used to allow editing of the tool groups in the
toolGroupManager.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTToolGroupDefaultsViewController *_Nonnull toolGroupDefaultsViewController;Swift
var toolGroupDefaultsViewController: PTToolGroupDefaultsViewController { get }
-
The navigation item used to represent the view controller in a parent's navigation bar.
The
PTDocumentNavigationItemsubclass allows setting bar button items for specific user interface size classes.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTDocumentNavigationItem *_Nonnull navigationItem;Swift
var navigationItem: PTDocumentNavigationItem { get }
-
When this view controller is contained in a
PTTabbedDocumentViewControllerinstance, shows all the tabbed document view controller’s document tabs.Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull tabsButtonItem;Swift
var tabsButtonItem: UIBarButtonItem { get } -
Whether the
tabsButtonItemshould be automatically shown when this view controller is contained in aPTTabbedDocumentViewController.The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic) BOOL automaticallyShowsTabsButton;Swift
var automaticallyShowsTabsButton: Bool { get set }
-
The
PTDocumentSliderViewControllermanaged by this view controller.Declaration
Objective-C
@property (nonatomic, strong) PTDocumentSliderViewController *_Nonnull documentSliderViewController;Swift
var documentSliderViewController: PTDocumentSliderViewController { get set } -
Whether the
documentSliderViewControlleris enabled and shown when thepdfViewCtrlis scrolled or the current page changes.The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isDocumentSliderEnabled) BOOL documentSliderEnabled;Swift
var isDocumentSliderEnabled: Bool { get set }
PTDocumentController Class Reference