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
toolGroupToolbar
is 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
areToolGroupsEnabled
property is enabled.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTToolGroupToolbar *_Nonnull toolGroupToolbar;
Swift
var toolGroupToolbar: PTToolGroupToolbar { get }
-
Whether the
isToolGroupToolbarHidden
property of this view controller is updated as part of its bar-hiding (and -showing) behavior.When enabled, the
isToolGroupToolbarHidden
property will be updated by thecontrolsHidden
property in response to handled taps, automatically based on a timer, and other logic. Otherwise, theisToolGroupToolbarHidden
property 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
isToolGroupToolbarHidden
Declaration
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
isToolGroupToolbarHidden
Declaration
Objective-C
- (void)setToolGroupToolbarHidden:(BOOL)hidden animated:(BOOL)animated;
Swift
func setToolGroupToolbarHidden(_ hidden: Bool, animated: Bool)
Parameters
hidden
Specify
YES
to hide the tool group toolbar orNO
to show it.animated
Specify
YES
if you want to animate the change in visibility orNO
if 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
PTDocumentNavigationItem
subclass 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
PTTabbedDocumentViewController
instance, 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
tabsButtonItem
should 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
PTDocumentSliderViewController
managed by this view controller.Declaration
Objective-C
@property (nonatomic, strong) PTDocumentSliderViewController *_Nonnull documentSliderViewController;
Swift
var documentSliderViewController: PTDocumentSliderViewController { get set }
-
Whether the
documentSliderViewController
is enabled and shown when thepdfViewCtrl
is 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 }