PTDocumentBaseViewController
@interface PTDocumentBaseViewController
: UIViewController <
PTOverridable, PTPDFViewCtrlDelegate, PTToolManagerDelegate,
PTCoordinatedDocumentDelegate, PTPDFDocumentManagerDelegate,
PTThumbnailSliderViewDelegate, PTOutlineViewControllerDelegate,
PTLegacyAnnotationViewControllerDelegate,
PTAnnotationViewControllerDelegate, PTBookmarkViewControllerDelegate,
PTDigitalSignaturesViewControllerDelegate,
PTPDFLayerViewControllerDelegate, PTReflowViewControllerDelegate,
PTDocumentViewSettingsControllerDelegate,
PTTextSearchViewControllerDelegate, UIDropInteractionDelegate>
A view controller that displays a PTPDFViewCtrl along with other controls.
-
Returns an initialized
PTDocumentBaseViewController.Declaration
Objective-C
- (nonnull instancetype)init;Swift
init()Return Value
an initialized
PTDocumentBaseViewController. -
The view controller’s underlying
PTPDFViewCtrl.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTPDFViewCtrl *_Nonnull pdfViewCtrl;Swift
var pdfViewCtrl: PTPDFViewCtrl { get } -
The tool manager attached to the underlying
PTPDFViewCtrl.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTToolManager *_Nonnull toolManager;Swift
var toolManager: PTToolManager { get }
-
The document manager used by this view controller.
Declaration
Objective-C
@property (nonatomic, strong, readonly) PTPDFDocumentManager *_Nonnull documentManager;Swift
var documentManager: PTPDFDocumentManager { get }
-
Open a document with the given URL.
Declaration
Objective-C
- (void)openDocumentWithURL:(nonnull NSURL *)url;Swift
func openDocument(with url: URL)Parameters
urlThe URL to open.
-
Open a document with the given URL and password.
Declaration
Objective-C
- (void)openDocumentWithURL:(nonnull NSURL *)url password:(nullable NSString *)password;Swift
func openDocument(with url: URL, password: String?)Parameters
urlThe URL to open.
passwordThe password for the document.
-
Open a document with the given URL and options.
Declaration
Objective-C
- (void)openDocumentWithURL:(nonnull NSURL *)url options:(nullable PTDocumentOptions *)options;Swift
func openDocument(with url: URL, options: PTDocumentOptions?)Parameters
urlThe URL to open
optionsThe options for the opening the document
-
PTHTTPRequestOptionsthat will be used when requesting remote documents over HTTP. These can be used to set additional HTTP headers and control if a linearized document should be downloaded in its entirety, or only the parts that are viewed.Declaration
Objective-C
@property (nonatomic, strong, nonnull) PTHTTPRequestOptions *httpRequestOptions;Swift
var httpRequestOptions: PTHTTPRequestOptions { get set } -
Specifies additional http headers which will be set on outgoing requests and when requesting remote documents over HTTP.
Headers specified in this dictionary will overwrite any (matching) existing headers in the
httpRequestOptionsproperty.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSDictionary<NSString *, NSString *> *additionalHTTPHeaders;Swift
var additionalHTTPHeaders: [String : String]? { get set } -
Options that will be used when converting documents with the
PTConvertAPIs via the-openDocumentWithURL:method.Declaration
Objective-C
@property (nonatomic, strong) PTConversionOptions *_Nonnull conversionOptions;Swift
var conversionOptions: PTConversionOptions { get set } -
The
PTCoordinatedDocumentif the viewer opens a local file withopenDocumentWithURL:.Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) PTCoordinatedDocument *coordinatedDocument;Swift
var coordinatedDocument: PTCoordinatedDocument? { get } -
The
PTPDFDocumentFileinstance if the viewer opens a local file withopenDocumentWithURL:.Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) PTPDFDocumentFile *documentFile;Swift
var documentFile: PTPDFDocumentFile? { get } -
The password for the current document, only filled if the user entered a password when opening the document.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *documentPassword;Swift
var documentPassword: String? { get }
-
Save the current document with the default options.
Declaration
Objective-C
- (void)saveDocumentWithCompletionHandler: (void (^_Nullable)(BOOL))completionHandler;Swift
func saveDocument() async -> BoolParameters
completionHandlerA block with code that is executed when the save operation concludes. The block returns no value, and the
successparam isYESif the save operation succeeds, otherwiseNO. -
Save the current document with the specified options.
If the
saveOptionsinclude thee_ptincrementalflag, and it is not possible to save incrementally (e.g. in the case that the xref table needed to be repaired), then the incremental flag will be ignored.Declaration
Objective-C
- (void)saveDocument:(PTSaveOptions)saveOptions completionHandler:(nullable void (^)(BOOL))completionHandler;Swift
func saveDocument(_ saveOptions: PTSaveOptions) async -> BoolParameters
saveOptionsThe options to save the document with.
completionHandlerA block with code that is executed when the save operation concludes. The block returns no value, and the
successparam isYESif the save operation succeeds, otherwiseNO. -
Whether changes in the document are saved automatically. The default value is
YES. The document is saved on best-effort basis on a timer with a period ofautomaticDocumentSavingInterval. The document is also saved when the app resigns the foreground, or this ViewController’s view disappears.Declaration
Objective-C
@property (nonatomic) BOOL automaticallySavesDocument;Swift
var automaticallySavesDocument: Bool { get set } -
The interval in seconds that the document is automatically saved.
The default value is
PTDocumentViewControllerSaveDocumentInterval.Setting the interval to
DBL_MAXdisables the timer entirely.Declaration
Objective-C
@property (nonatomic) NSTimeInterval automaticDocumentSavingInterval;Swift
var automaticDocumentSavingInterval: TimeInterval { get set } -
If a save is attempted, and cannot be completed, a UIAlertController is shown with the title “Saving Error”. The
errorMessagestring is the message detail that is displayed. The default value is “The document could not be saved due to an error.”.Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nonnull saveErrorMessage;Swift
var saveErrorMessage: String { get set } -
The message shown while loading an image or any other file types that are convertible by PDFTron or loading a remote document. When the value is not set it shows “Opening PDF…”.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSString *documentLoadingMessage;Swift
var documentLoadingMessage: String? { get set } -
Restart the automatic document saving timer with the interval specified in the
automaticDocumentSavingIntervalproperty.Declaration
Objective-C
- (void)restartAutomaticDocumentSavingTimer;Swift
func restartAutomaticDocumentSavingTimer() -
Restart the automatic document saving timer with the specified interval.
The
automaticDocumentSavingIntervalproperty is updated with the specified interval.Declaration
Objective-C
- (void)restartAutomaticDocumentSavingTimerWithInterval: (NSTimeInterval)interval;Swift
func restartAutomaticDocumentSavingTimer(withInterval interval: TimeInterval)Parameters
intervalThe interval to use for automatic document saving.
-
Stop the automatic document saving timer.
Declaration
Objective-C
- (void)stopAutomaticDocumentSavingTimer;Swift
func stopAutomaticDocumentSavingTimer()
-
In cases where the original document cannot be saved back to its source location, and the view controller is being deallocated and its document contains unsaved changes, this property controls whether a backup copy of the document is saved to disk.
The default value of this property is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isDocumentBackupSavingEnabled) BOOL documentBackupSavingEnabled;Swift
var isDocumentBackupSavingEnabled: Bool { get set } -
The file URL of the directory where document backups should be saved.
The default value of this property is the application’s user-visible
Documents/directory.Declaration
Objective-C
@property (nonatomic, strong, nullable) NSURL *documentBackupDirectoryURL;Swift
var documentBackupDirectoryURL: URL? { get set }
-
Closes the document after saving with the
-saveDocument:completionHandler:method.Declaration
Objective-C
- (void)closeDocument;Swift
func closeDocument() -
Closes the document after saving with the
-saveDocument:completionHandler:method.Declaration
Objective-C
- (void)closeDocumentWithCompletionHandler: (nullable void (^)(BOOL))completionHandler;Swift
func closeDocument() async -> BoolParameters
completionHandlerCalled when the document has been successfully or unsuccessfully closed as indicated by the
successparameter.
-
The containing tabbed document view controller, if this view controller is managed by a
PTTabbedDocumentViewControllerinstance.Declaration
Objective-C
@property (nonatomic, weak, readonly, nullable) PTTabbedDocumentViewController *tabbedDocumentViewController;Swift
weak var tabbedDocumentViewController: PTTabbedDocumentViewController? { get } -
The tab item representing this view controller in a
PTTabbedDocumentViewController.Declaration
Objective-C
@property (nonatomic, weak, nullable) PTDocumentTabItem *documentTabItem;Swift
weak var documentTabItem: PTDocumentTabItem? { get set }
-
Whether tapping on the right or left edges of the page in single page-presentation mode (non-continuous) will change the current page to the next or previous page, respectively.
The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic) BOOL changesPageOnTap;Swift
var changesPageOnTap: Bool { get set } -
Whether the
pdfViewCtrlpage fits between the top navigation bar and bottom toolbar. When disabled, the page content will fit to the size of this view controller and scroll if necessary; when enabled, the page content will fit in the visible space between the bars without scrolling (at the minimum zoom scale).This property controls the view controller’s
edgesForExtendedLayoutproperty: theUIRectEdgeTopandUIRectEdgeBottomvalues are excluded from that bitmask property when thepageFitsBetweenBarsproperty is enabled.The
isTranslucentproperty of thePTThumbnailSliderViewController.toolbaris also affected by thepageFitsBetweenBarsproperty: when this property is enabled, the thumbnail slider’s toolbar is set to be non-translucent. Otherwise, the toolbar is translucent.The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic) BOOL pageFitsBetweenBars; -
Whether night mode is enabled for the
pdfViewCtrl. The default value isNO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isNightModeEnabled) BOOL nightModeEnabled;Swift
var isNightModeEnabled: Bool { get set } -
Controls if the
ThumbnailSlideris enabled.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isBottomToolbarEnabled) BOOL bottomToolbarEnabled;Swift
var isBottomToolbarEnabled: Bool { get set } -
Controls if the
thumbnailSliderControlleris enabled.The default value is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isThumbnailSliderEnabled) BOOL thumbnailSliderEnabled;Swift
var isThumbnailSliderEnabled: Bool { get set } -
Controls if the
PTPageIndicatorViewControlleris enabled. The default value isYES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isPageIndicatorEnabled) BOOL pageIndicatorEnabled;Swift
var isPageIndicatorEnabled: Bool { get set } -
Whether the
PTPageIndicatorViewControlleris shown when the current page changes. The default value isYES.Declaration
Objective-C
@property (nonatomic) BOOL pageIndicatorShowsOnPageChange;Swift
var pageIndicatorShowsOnPageChange: Bool { get set } -
Whether the
PTPageIndicatorViewControlleris shown with the navigation bar and toolbars. The default value isYES.Declaration
Objective-C
@property (nonatomic) BOOL pageIndicatorShowsWithControls;Swift
var pageIndicatorShowsWithControls: Bool { get set } -
Whether the
PTPageIndicatorViewControlleris always visible. Iffalse, the indicator will fade away when the toolbars hide, or after a short period of time looking at the same page. The default value isNO.Declaration
Objective-C
@property (nonatomic) BOOL pageIndicatorAlwaysVisible;Swift
var pageIndicatorAlwaysVisible: Bool { get set }
-
The
PTNavigationHistoryManagerused to track user navigation (link following, go-to-page, etc.) within the document.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTNavigationHistoryManager *_Nonnull navigationHistoryManager;Swift
var navigationHistoryManager: PTNavigationHistoryManager { get } -
The
PTNavigationHistoryViewControllerinstance used by this view controller.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTNavigationHistoryViewController *_Nonnull navigationHistoryViewController;Swift
var navigationHistoryViewController: PTNavigationHistoryViewController { get } -
Whether the navigation history view shown by the
navigationHistoryViewControlleris enabled. Set the value of this property toNOto disable navigation history and hide the navigation history user interface.The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isNavigationHistoryEnabled) BOOL navigationHistoryEnabled;Swift
var isNavigationHistoryEnabled: Bool { get set }
-
Whether the
PTNavigationListsViewControllerincludes the defaultPTAnnotationViewControllerDeclaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isAnnotationListHidden) BOOL annotationListHidden;Swift
var isAnnotationListHidden: Bool { get set } -
Whether the
PTNavigationListsViewControllerincludes the defaultPTOutlineViewControllerDeclaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isOutlineListHidden) BOOL outlineListHidden;Swift
var isOutlineListHidden: Bool { get set } -
Whether the
PTNavigationListsViewControllerincludes the defaultPTBookmarkViewControllerDeclaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isBookmarkListHidden) BOOL bookmarkListHidden;Swift
var isBookmarkListHidden: Bool { get set } -
Whether the
PTNavigationListsViewControllerincludes the defaultPTDigitalSignaturesViewControllerDeclaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isDigitalSignatureValidationListHidden) BOOL digitalSignatureValidationListHidden;Swift
var isDigitalSignatureValidationListHidden: Bool { get set } -
Whether the
PTNavigationListsViewControllerincludes the defaultPTPDFLayerViewControllerDeclaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isPDFLayerListHidden) BOOL pdfLayerListHidden;Swift
var isPDFLayerListHidden: Bool { get set }
-
The panel view controller used to display child view controllers as resizable panels.
Declaration
Objective-C
@property (nonatomic, strong, readonly) PTPanelViewController *_Nonnull panelViewController;Swift
var panelViewController: PTPanelViewController { get }
-
Shows a
PTReflowViewController.Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull readerModeButtonItem;Swift
var readerModeButtonItem: UIBarButtonItem { get } -
Shows the
PTTextSearchViewControllertoolbar for text search.Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull searchButtonItem;Swift
var searchButtonItem: UIBarButtonItem { get } -
Shows options for exporting the document.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull exportButtonItem;Swift
var exportButtonItem: UIBarButtonItem { get } -
Exports a copy of the document.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull exportCopyButtonItem;Swift
var exportCopyButtonItem: UIBarButtonItem { get } -
Exports a flattened copy of the document.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull exportFlattenedCopyButtonItem;Swift
var exportFlattenedCopyButtonItem: UIBarButtonItem { get } -
Exports a reduced file size copy of the document.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull exportReducedFileSizeCopyButtonItem;Swift
var exportReducedFileSizeCopyButtonItem: UIBarButtonItem { get } -
Exports a cropped copy of the document.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull exportCroppedCopyButtonItem;Swift
var exportCroppedCopyButtonItem: UIBarButtonItem { get } -
Shows a
UIDocumentInteractionControllerfor the current document.Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull shareButtonItem;Swift
var shareButtonItem: UIBarButtonItem { get } -
Shows a
PTDocumentViewSettingsControllerto control the view settings.Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull settingsButtonItem;Swift
var settingsButtonItem: UIBarButtonItem { get } -
Shows a
PTToolsSettingsViewControllerto control the view settings.Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull appSettingsButtonItem;Swift
var appSettingsButtonItem: UIBarButtonItem { get } -
Shows a
PTThumbnailsViewControllerfor the current document.Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull thumbnailsButtonItem;Swift
var thumbnailsButtonItem: UIBarButtonItem { get } -
Shows a
PTNavigationListsViewControllerwith outline, annotations, and bookmarks view controllers.Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull navigationListsButtonItem;Swift
var navigationListsButtonItem: UIBarButtonItem { get } -
Shows the
PTMoreItemsViewController.Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull moreItemsButtonItem;Swift
var moreItemsButtonItem: UIBarButtonItem { get } -
Shows the
PTAddPagesViewController.Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull addPagesButtonItem;Swift
var addPagesButtonItem: UIBarButtonItem { get } -
Adds a bookmark to the current page, or removes the existing bookmark of the current page.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull bookmarkPageButtonItem;Swift
var bookmarkPageButtonItem: UIBarButtonItem { get }
-
Controls the visibility of the
readerModeButtonItemin the navigation bar, bottom toolbar, and more items list.The default value of this property is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isReaderModeButtonHidden) BOOL readerModeButtonHidden;Swift
var isReaderModeButtonHidden: Bool { get set } -
Controls the visibility of the
settingsButtonItemin the navigation bar, bottom toolbar, and more items list.The default value of this property is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isViewerSettingsButtonHidden) BOOL viewerSettingsButtonHidden;Swift
var isViewerSettingsButtonHidden: Bool { get set } -
Controls the visibility of the
appSettingsButtonItemin the navigation bar, bottom toolbar, and more items list.The default value of this property is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isAppSettingsButtonHidden) BOOL appSettingsButtonHidden;Swift
var isAppSettingsButtonHidden: Bool { get set } -
Controls the visibility of the
shareButtonItemin the navigation bar, bottom toolbar, and more items list.The default value of this property is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isShareButtonHidden) BOOL shareButtonHidden;Swift
var isShareButtonHidden: Bool { get set } -
Controls the visibility of the
searchButtonItemin the navigation bar, bottom toolbar, and more items list.The default value of this property is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isSearchButtonHidden) BOOL searchButtonHidden;Swift
var isSearchButtonHidden: Bool { get set } -
Controls the visibility of the export button in the navigation bar, bottom toolbar, and more items list.
The default value of this property is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isExportButtonHidden) BOOL exportButtonHidden;Swift
var isExportButtonHidden: Bool { get set } -
Controls the visibility of the
moreItemsButtonItemin the navigation bar, bottom toolbar, and more items list.The default value of this property is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isMoreItemsButtonHidden) BOOL moreItemsButtonHidden;Swift
var isMoreItemsButtonHidden: Bool { get set } -
Controls the visibility of the
addPagesButtonItemin the navigation bar, bottom toolbar, and more items list.The default value of this property is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isAddPagesButtonHidden) BOOL addPagesButtonHidden;Swift
var isAddPagesButtonHidden: Bool { get set } -
Controls the visibility of the
bookmarkPageButtonItemin the navigation bar, bottom toolbar.The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isBookmarkPageButtonHidden) BOOL bookmarkPageButtonHidden;Swift
var isBookmarkPageButtonHidden: Bool { get set } -
Controls the visibility of the
thumbnailsButtonItemin the navigation bar, bottom toolbar, and more items list.The default value of this property is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isThumbnailBrowserButtonHidden) BOOL thumbnailBrowserButtonHidden;Swift
var isThumbnailBrowserButtonHidden: Bool { get set } -
Controls the visibility of the
navigationListsButtonItemin the navigation bar, bottom toolbar, and more items list.The default value of this property is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isNavigationListsButtonHidden) BOOL navigationListsButtonHidden;Swift
var isNavigationListsButtonHidden: Bool { get set }
-
The toolbar items associated with the view controller.
The getter for this property returns
-toolbarItemsForSizeClass:for the current horizontal user interface size class, and the setters uses-setToolbarItems:forSizeClass:animated:to set the toolbar items for all user interface size classes.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSArray<UIBarButtonItem *> *toolbarItems;Swift
var toolbarItems: [UIBarButtonItem]? { get set } -
Returns the
toolbarItemsfor the given horizontal user interface size class.Declaration
Objective-C
- (nullable NSArray<UIBarButtonItem *> *)toolbarItemsForSizeClass: (UIUserInterfaceSizeClass)sizeClass;Swift
func toolbarItems(for sizeClass: UIUserInterfaceSizeClass) -> [UIBarButtonItem]?Parameters
sizeClassthe horizontal user interface size class for which to get the list of items
Return Value
the
toolbarItemsfor the given horizontal user interface size class -
Sets the
toolbarItemsused for the given horizontal size class.Declaration
Objective-C
- (void)setToolbarItems:(nullable NSArray<UIBarButtonItem *> *)toolbarItems forSizeClass:(UIUserInterfaceSizeClass)sizeClass animated:(BOOL)animated;Swift
func setToolbarItems(_ toolbarItems: [UIBarButtonItem]?, for sizeClass: UIUserInterfaceSizeClass, animated: Bool)Parameters
toolbarItemsthe toolbar items to use
sizeClassthe horizontal user interface size class
animatedwhether to animate the change
-
The items currently shown by the
moreItemsViewControllerin a list-style interface for the current trait collection.The getter for this property returns
-moreItemsForSizeClass:for the current horizontal user inteface size class, and the setter uses-setMoreItems:forSizeClass:to set the items for all user interface size classes.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSArray<UIBarButtonItem *> *moreItems;Swift
var moreItems: [UIBarButtonItem]? { get set } -
Returns the
moreItemsshown by themoreItemsViewControllerfor the given horizontal user interface size class.Declaration
Objective-C
- (nullable NSArray<UIBarButtonItem *> *)moreItemsForSizeClass: (UIUserInterfaceSizeClass)sizeClass;Swift
func moreItems(for sizeClass: UIUserInterfaceSizeClass) -> [UIBarButtonItem]?Parameters
sizeClassthe horizontal user interface size class for which to get the list of items
Return Value
the items shown by the
moreItemsViewControllerfor the given horizontal user interface size class -
Sets the
moreItemsshown by themoreItemsViewControllerfor the given horizontal user interface size class.Declaration
Objective-C
- (void)setMoreItems:(nullable NSArray<UIBarButtonItem *> *)moreItems forSizeClass:(UIUserInterfaceSizeClass)sizeClass;Swift
func setMoreItems(_ moreItems: [UIBarButtonItem]?, for sizeClass: UIUserInterfaceSizeClass)Parameters
moreItemsthe items to show
sizeClassthe horizontal user interface size class
-
The items currently shown by the
moreItemsViewController.The getter for this property returns
-moreItemsForSizeClass:for the current horizontal user inteface size class, and the setter uses-setMoreItems:forSizeClass:to set the items for all user interface size classes.Declaration
Objective-C
@property (nonatomic, copy, nullable) NSArray<UIBarButtonItem *> *exportItems;Swift
var exportItems: [UIBarButtonItem]? { get set }
-
The
PTReflowSettingsViewControllerinstance used to display settings controlling the behavior of reflow/reader mode.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTReflowSettingsViewController *_Nonnull reflowSettingsViewController;Swift
var reflowSettingsViewController: PTReflowSettingsViewController { get } -
Presents the
reflowSettingsViewControllerfrom thesender.Declaration
Objective-C
- (void)showReflowSettings:(nullable id)sender;Swift
func showReflowSettings(_ sender: Any?) -
Shows the
reflowSettingsViewController.Declaration
Objective-C
@property (nonatomic, strong, readonly) UIBarButtonItem *_Nonnull reflowSettingsButtonItem;Swift
var reflowSettingsButtonItem: UIBarButtonItem { get } -
Controls the visibility of the
reflowSettingsButtonItemin the navigation bar.The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isReflowSettingsButtonHidden) BOOL reflowSettingsButtonHidden;Swift
var isReflowSettingsButtonHidden: Bool { get set } -
Whether the
reflowSettingsButtonItemis automatically shown and hidden when reflow/reader mode is toggled.The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic) BOOL automaticallyHidesReflowSettingsButton;Swift
var automaticallyHidesReflowSettingsButton: Bool { get set } -
Shows the
reflowSettingsViewController.Declaration
Objective-C
@property (nonatomic, strong, readonly) PT_DEPRECATED_MSG(9.3.1, "Use reflowSettingsButtonItem instead") UIBarButtonItem *reflowSettingButtonItem;Swift
var reflowSettingButtonItem: UIBarButtonItem { get } -
Controls the visibility of the
reflowSettingButtonItemin the navigation bar.The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isReflowSettingButtonHidden) BOOL reflowSettingButtonHidden;Swift
var isReflowSettingButtonHidden: Bool { get set }
-
The
UIActivityViewControllerused to present action and sharing activities for the current document.Declaration
Objective-C
@property (nonatomic, strong, nullable) UIActivityViewController *activityViewController;Swift
var activityViewController: UIActivityViewController? { get set } -
The navigation lists view controller managed by this view controller.
Declaration
Objective-C
@property (nonatomic, strong) PTNavigationListsViewController *_Nonnull navigationListsViewController;Swift
var navigationListsViewController: PTNavigationListsViewController { get set } -
Whether the navigation lists view controller is always shown as a modal presentation. When set to
NO, the view controller is shown as a docked panel on iPads when there is sufficient horizontal space. The default value isNO.Declaration
Objective-C
@property (nonatomic) BOOL alwaysShowNavigationListsAsModal;Swift
var alwaysShowNavigationListsAsModal: Bool { get set } -
Shows the
navigationListsViewController.Declaration
Objective-C
- (void)showNavigationLists;Swift
func showNavigationLists() -
The
PTThumbnailsViewControllerview controller managed by this view controller.Declaration
Objective-C
@property (nonatomic, strong) PTThumbnailsViewController *_Nonnull thumbnailsViewController;Swift
var thumbnailsViewController: PTThumbnailsViewController { get set } -
Hides any presented view controllers and shows the
thumbnailsViewController.Declaration
Objective-C
- (void)showThumbnailsController;Swift
func showThumbnailsController() -
The
PTTextSearchViewControllermanaged by this view controller.Declaration
Objective-C
@property (nonatomic, strong) PTTextSearchViewController *_Nonnull textSearchViewController;Swift
var textSearchViewController: PTTextSearchViewController { get set } -
Hides any presented view controllers and shows the
textSearchViewController.Declaration
Objective-C
- (void)showSearchViewController;Swift
func showSearch() -
The
PTPageCropViewControllerview controller managed by this view controller.Declaration
Objective-C
@property (nonatomic, strong) PTPageCropViewController *_Nonnull pageCropViewController;Swift
var pageCropViewController: PTPageCropViewController { get set } -
Shows a dialog to select a page crop mode option.
Declaration
Objective-C
- (void)showPageCropOptions:(id _Nullable)sender;Swift
func showPageCropOptions(_ sender: Any?) -
Hides any presented view controllers and shows the
pageCropViewController.Declaration
Objective-C
- (void)showPageCropViewController;Swift
func showPageCropViewController() -
The
PTThumbnailSliderViewControllermanaged by this view controller.Declaration
Objective-C
@property (nonatomic, strong) PTThumbnailSliderViewController *_Nonnull thumbnailSliderController;Swift
var thumbnailSliderController: PTThumbnailSliderViewController { get set } -
The
PTPageIndicatorViewControllermanaged by this view controller.Declaration
Objective-C
@property (nonatomic, strong) PTPageIndicatorViewController *_Nonnull pageIndicatorViewController;Swift
var pageIndicatorViewController: PTPageIndicatorViewController { get set } -
The
PTDocumentViewSettingsControllermanaged by this view controller.Declaration
Objective-C
@property (nonatomic, strong) PTDocumentViewSettingsController *_Nonnull settingsViewController;Swift
var settingsViewController: PTDocumentViewSettingsController { get set } -
The
PTReflowViewControllermanaged by this view controller.Declaration
Objective-C
@property (nonatomic, strong) PTReflowViewController *_Nonnull reflowViewController;Swift
var reflowViewController: PTReflowViewController { get set } -
The
PTMoreItemsViewControllermanaged by this view controller.Declaration
Objective-C
@property (nonatomic, strong) PTMoreItemsViewController *_Nonnull moreItemsViewController;Swift
var moreItemsViewController: PTMoreItemsViewController { get set } -
Shows the
moreItemsViewControllerin a popover presentation.Declaration
Objective-C
- (void)showMoreItems:(nonnull id)sender;Swift
func showMoreItems(_ sender: Any) -
The
PTAddPagesViewControllermanaged by this view controller.Declaration
Objective-C
@property (nonatomic, strong) PTAddPagesViewController *_Nonnull addPagesViewController;Swift
var addPagesViewController: PTAddPagesViewController { get set } -
Shows the
settingsViewControllerin a popover presentation from the specified UIBarButtonItem.Declaration
Objective-C
- (void)showSettings:(nonnull id)sender;Swift
func showSettings(_ sender: Any)Parameters
senderthe object (usually a
UIBarButtonItemorUIView) on which to anchor the popover. -
Shows the
settingsViewControllerin a popover presentation from the specified screen rect.Declaration
Objective-C
- (void)showSettingsFromScreenRect:(CGRect)screenRect;Swift
func showSettings(fromScreenRect screenRect: CGRect)Parameters
screenRectthe rectangle in which to anchor the popover.
-
Shows the
addPagesViewControllerin a popover presentation from the specified UIBarButtonItem.Declaration
Objective-C
- (void)showAddPagesView:(nonnull id)sender;Swift
func showAddPagesView(_ sender: Any)Parameters
senderthe object (usually a
UIBarButtonItemorUIView) on which to anchor the popover. -
Shows the
addPagesViewControllerin a popover presentation from the specified screen rect.Declaration
Objective-C
- (void)showAddPagesViewFromScreenRect:(CGRect)screenRect;Swift
func showAddPagesView(fromScreenRect screenRect: CGRect)Parameters
screenRectthe rectangle in which to anchor the popover.
-
Creates an activity alert with the given title
Declaration
Objective-C
- (nonnull UIViewController *)createActivityAlertWithTitle: (nonnull NSString *)title;Swift
func createActivityAlert(withTitle title: String) -> UIViewControllerParameters
titlethe text to be displayed on the alert
-
Called when
shareButtonItemis tappedDeclaration
Objective-C
- (void)showShareActions:(nonnull UIBarButtonItem *)barButtonItem;Swift
func showShareActions(_ barButtonItem: UIBarButtonItem) -
Shares a copy of the document in a
UIActivityViewController.Declaration
Objective-C
- (void)shareCopy:(nonnull id)sender withFlattening:(BOOL)flattening;Swift
func shareCopy(_ sender: Any, withFlattening flattening: Bool)Parameters
senderthe object (usually a
UIBarButtonItemorUIView) on which to anchor the popover.flatteningwhether annotations in the document should be flattened before sharing.
-
Shares a copy of the document in a
UIActivityViewController.Declaration
Objective-C
- (void)shareCopy:(nonnull id)sender withFlattening:(BOOL)flattening targetFileName:(nullable NSString *)targetFileName;Swift
func shareCopy(_ sender: Any, withFlattening flattening: Bool, targetFileName: String?)Parameters
senderthe object (usually a
UIBarButtonItemorUIView) on which to anchor the popover.flatteningwhether annotations in the document should be flattened before sharing.
targetFileNameThe file name of the exported document without extension.
-
Shares a copy of the document in a
UIActivityViewController.Declaration
Objective-C
- (void)shareCopy:(nonnull id)sender withFlattening:(BOOL)flattening completionHandler:(nullable void (^)(BOOL))completionHandler;Swift
func shareCopy(_ sender: Any, withFlattening flattening: Bool) async -> BoolParameters
senderthe object (usually a
UIBarButtonItemorUIView) on which to anchor the popover.flatteningwhether annotations in the document should be flattened before sharing.
-
Shares a copy of the document in a
UIActivityViewController.Declaration
Objective-C
- (void)shareCopy:(nonnull id)sender withFlattening:(BOOL)flattening targetFileName:(nullable NSString *)targetFileName completionHandler:(nullable void (^)(BOOL))completionHandler;Swift
func shareCopy(_ sender: Any, withFlattening flattening: Bool, targetFileName: String?) async -> BoolParameters
senderthe object (usually a
UIBarButtonItemorUIView) on which to anchor the popover.flatteningwhether annotations in the document should be flattened before sharing.
targetFileNameThe file name of the exported document without extension.
-
Shares a copy of the document in a
UIActivityViewController.Declaration
Objective-C
- (void)shareCopyFromScreenRect:(CGRect)screenRect withFlattening:(BOOL)flattening;Swift
func shareCopy(fromScreenRect screenRect: CGRect, withFlattening flattening: Bool)Parameters
screenRectthe rectangle in which to anchor the popover.
flatteningwhether annotations in the document should be flattened before sharing.
-
This function is called when export as identical copy button in overflow menu is tapped
Declaration
Objective-C
- (void)exportIdenticalCopySelected;Swift
func exportIdenticalCopySelected() -
This function is called when export as flattened copy button in overflow menu is tapped
Declaration
Objective-C
- (void)exportFlattenedCopySelected;Swift
func exportFlattenedCopySelected() -
Shares a copy of the document in a
UIActivityViewController.Declaration
Objective-C
- (void)shareDocument:(nonnull PTPDFDoc *)pdfDoc with:(nullable NSURL *)url from:(nonnull id)sender requiresSave:(BOOL)requiresSave;Swift
func shareDocument(_ pdfDoc: PTPDFDoc, with url: URL?, from sender: Any, requiresSave: Bool)Parameters
pdfDocthe
PTPDFDocto share.urlthe file URL of the document.
senderthe object (usually a
UIBarButtonItemorUIView) on which to anchor the popover.requiresSavewhether the document needs to be saved before sharing.
-
The
PTCustomTableViewControllermanaged by this view controller for showing export options.Declaration
Objective-C
@property (nonatomic, strong) PTCustomTableViewController *_Nonnull exportTableViewController;Swift
var exportTableViewController: PTCustomTableViewController { get set }
-
Whether the controls are toggled in response to an otherwise unhandled tap.
The default value of this property is
YES.See
controlsHiddenSee
hidesBottomBarDeclaration
Objective-C
@property (nonatomic) BOOL hidesControlsOnTap;Swift
var hidesControlsOnTap: Bool { get set } -
Whether the
isNavigationBarHiddenproperty of this view controller’s containingUINavigationControlleris controlled by this view controller.When enabled, this view controller will update the
UINavigationController.isNavigationBarHiddenproperty as part of its bar-hiding (and -showing) behavior. Otherwise, this view controller will not update theisNavigationBarHiddenproperty 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
hidesBottomBarDeclaration
Objective-C
@property (nonatomic) BOOL hidesNavigationBar;Swift
var hidesNavigationBar: Bool { get set } -
Whether the
isToolbarHiddenproperty of this view controller’sUINavigationControlleris controlled by this view controller.When enabled, this view controller will update the
UINavigationController.isToolbarHiddenproperty as part of its bar-hiding (and -showing) behavior. Otherwise, this view controller will not update theisToolbarHiddenproperty 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.Declaration
Objective-C
@property (nonatomic) BOOL hidesBottomBar;Swift
var hidesBottomBar: Bool { get set } -
Whether the navigation bar, toolbars, and other controls are hidden. When hiding or showing controls, the
hidesNavigationBarandhidesBottomBarproperties are respected.The default value of this property is
NO.See
hidesBottomBarDeclaration
Objective-C
@property (nonatomic) BOOL controlsHidden;Swift
var controlsHidden: Bool { get set } -
Sets whether the controls are hidden.
For animated transitions, the duration of the animation is specified by the value in the
UINavigationControllerHideShowBarDurationconstant.Declaration
Objective-C
- (void)setControlsHidden:(BOOL)hidden animated:(BOOL)animated;Swift
func setControlsHidden(_ hidden: Bool, animated: Bool)Parameters
hiddenSpecify
YESto hide the controls orNOto show themanimatedSpecify
YESif you want to animate the change in visibility orNOif you want the controls to appear immediately. -
Whether the find text toolbar is hidden. The default value is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isSearchViewControllerHidden) BOOL searchViewControllerHidden;Swift
var isSearchViewControllerHidden: Bool { get set } -
Whether the thumbnail slider control is hidden. The default value is
NO.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isThumbnailSliderHidden) BOOL thumbnailSliderHidden;Swift
var isThumbnailSliderHidden: Bool { get set } -
Sets whether the thumbnail slider control is hidden.
For animated transitions, the duration of the animation is specified by the value in the
UINavigationControllerHideShowBarDurationconstant.Declaration
Objective-C
- (void)setThumbnailSliderHidden:(BOOL)hidden animated:(BOOL)animated;Swift
func setThumbnailSliderHidden(_ hidden: Bool, animated: Bool)Parameters
hiddenSpecify
YESto hide the thumbnail slider orNOto show itanimatedSpecify
YESif you want to animate the change in visibility orNOif you want the control to appear immediately -
Whether the page indicator control is hidden. The default value is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isPageIndicatorHidden) BOOL pageIndicatorHidden;Swift
var isPageIndicatorHidden: Bool { get set } -
Sets whether the page indicator control is hidden.
Declaration
Objective-C
- (void)setPageIndicatorHidden:(BOOL)hidden animated:(BOOL)animated;Swift
func setPageIndicatorHidden(_ hidden: Bool, animated: Bool)Parameters
hiddenSpecify
YESto hide the page indicator orNOto show it.animatedSpecify
YESif you want to animate the change in visibility orNOif you want the control to appear immediately. -
Whether the reflow control is hidden. The default value is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isReflowHidden) BOOL reflowHidden;Swift
var isReflowHidden: Bool { get set } -
Controls the visibility of the activity indicator i.e progress spinner while loading the document.
The default value of this property is
NO.Declaration
Objective-C
@property (nonatomic) BOOL hidesProgressSpinner;Swift
var hidesProgressSpinner: Bool { get set }
-
Whether the controls are hidden automatically after a period of time. The default value is
NO.The
automaticControlHidingDelayis used to specify the time delay.Declaration
Objective-C
@property (nonatomic) BOOL automaticallyHidesControls;Swift
var automaticallyHidesControls: Bool { get set } -
Whether the controls are hidden automatically after a period of time. The default value is
NO.The
automaticControlHidingDelayis used to specify the time delay.Declaration
Objective-C
@property (nonatomic) BOOL automaticallyHideToolbars;Swift
var automaticallyHideToolbars: Bool { get set } -
The number of seconds to wait before automatically hiding the controls. The default value is
PTDocumentViewControllerHideControlsInterval.Declaration
Objective-C
@property (nonatomic) NSTimeInterval automaticControlHidingDelay;Swift
var automaticControlHidingDelay: TimeInterval { get set } -
Restart the automatic control hiding timer with the delay specified in the
automaticControlHidingDelayproperty.Declaration
Objective-C
- (void)restartAutomaticControlHidingTimer;Swift
func restartAutomaticControlHidingTimer() -
Restart the automatic control hiding timer with the specified delay.
The
automaticControlHidingDelayproperty is updated with the specified delay.Declaration
Objective-C
- (void)restartAutomaticControlHidingTimerWithDelay:(NSTimeInterval)delay;Swift
func restartAutomaticControlHidingTimer(withDelay delay: TimeInterval)Parameters
delayThe delay to use for automatic control hiding.
-
Stop the automatic control hiding timer.
Declaration
Objective-C
- (void)stopAutomaticControlHidingTimer;Swift
func stopAutomaticControlHidingTimer() -
Whether the controls should be hidden in response to the given timer firing.
The default implementation of this method returns the value of the
automaticallyHideToolbarsproperty.Declaration
Objective-C
- (BOOL)shouldHideControlsFromTimer:(nonnull NSTimer *)timer;Swift
func shouldHideControls(from timer: Timer) -> Bool -
Flattened document exporting
Declaration
Objective-C
- (void)exportDocWithFlattening:(BOOL)flattening targetFileName:(nullable NSString *)targetFileName withCompletionHandler: (nonnull void (^)(NSURL *_Nullable, NSError *_Nullable))completionHandler;Swift
func exportDoc(withFlattening flattening: Bool, targetFileName: String?) async throws -> URLParameters
flatteningWhether the document should be flattened before exporting.
targetFileNameThe desired name of the output file. If this is
nilthen the filename of the document in the viewer will be used.completionHandlerThe completion handler to be called when the export is finished. If the document was processed successfully then the
exportedDocURLparameter will be the URL of the exported file, otherwise theerrorparameter contains more information about the failure. -
Returns an object initialized from data in a given unarchiver.
Declaration
Objective-C
- (nonnull instancetype)initWithCoder:(nonnull NSCoder *)coder;Swift
init(coder: NSCoder) -
Undocumented
Declaration
Objective-C
- (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE;
-
Whether view state persistence is enabled.
The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isViewStatePersistenceEnabled) BOOL viewStatePersistenceEnabled;Swift
var isViewStatePersistenceEnabled: Bool { get set } -
The string used to identify the saved view state for a document among other metadata.
The default value of this property is a Tools-specific identifier string.
Declaration
Objective-C
@property (class, nonatomic, copy, null_resettable) NSString *savedViewStateIdentifier;Swift
class var savedViewStateIdentifier: String! { get set } -
Saves the document’s current view state.
Note
In Swift, this method is imported as a throwing function.
Declaration
Objective-C
- (BOOL)saveCurrentViewStateForDocumentWithError: (NSError *_Nullable *_Nullable)error;Swift
func saveCurrentViewStateForDocument() throwsParameters
errorOn input, a pointer to an error object. If an error occurs , this pointer is set to an actual error object containing the error information. You may specify
nilfor this parameter if you do not want the error information.Return Value
YESif the view state was saved,NOotherwise if an error occurred -
Restores the document’s saved view state.
Note
In Swift, this method is imported as a throwing function.
Declaration
Objective-C
- (BOOL)restoreCurrentViewStateForDocumentWithError: (NSError *_Nullable *_Nullable)error;Swift
func restoreCurrentViewStateForDocument() throwsParameters
errorOn input, a pointer to an error object. If an error occurs , this pointer is set to an actual error object containing the error information. You may specify
nilfor this parameter if you do not want the error information.Return Value
YESif the view state was restored,NOotherwise if an error occurred
-
This method is called when a document has been successfully opened in this view controller.
Declaration
Objective-C
- (void)didOpenDocument;Swift
func didOpenDocument() -
This method is called when a document could not be opened in this view controller.
Declaration
Objective-C
- (void)handleDocumentOpeningFailureWithError:(nullable NSError *)error;Swift
func handleDocumentOpeningFailureWithError(_ error: (any Error)?)Parameters
errorThe error object describing the failure. May be
nilif information regarding the failure was not available -
This method is called when the view controller enters an invalid state.
In response, the document could be re-opened or this view controller could be closed or dismissed.
Declaration
Objective-C
- (void)didBecomeInvalid;Swift
func didBecomeInvalid()
-
This method is called if there was an error while saving the specified document.
Declaration
Objective-C
- (void)didFailSavingDocument:(nonnull PTPDFDoc *)pdfDoc withError:(nonnull NSError *)error;Swift
func didFailSavingDocument(_ pdfDoc: PTPDFDoc, withError error: any Error)Parameters
pdfDocThe PDF document that could not be saved.
errorThe error that occurred while saving the document.
-
This method is called when the panel is opened.
Declaration
Objective-C
- (void)didShowLeadingPanelViewController: (nonnull UIViewController *)viewController;Swift
func didShowLeadingPanelViewController(_ viewController: UIViewController) -
This method is called when the panel is closed.
Declaration
Objective-C
- (void)didDismissLeadingPanelViewController: (nonnull UIViewController *)viewController;Swift
func didDismissLeadingPanelViewController(_ viewController: UIViewController)
-
Returns whether the cached document at the given temporary URL should be exported to a different permanent location. The temporary URL does not point to a user-visible location and if the cached document is not exported it may be deleted by the system at any time.
The default implementation of this method returns
YES.Declaration
Objective-C
- (BOOL)shouldExportCachedDocumentAtURL:(nonnull NSURL *)cachedDocumentURL;Swift
func shouldExportCachedDocument(at cachedDocumentURL: URL) -> BoolParameters
cachedDocumentURLthe temporary URL of the cached document
Return Value
YESif the cached document should be exported,NOotherwise. -
Returns the destination URL for the document at the given source URL location. If
nilis returned from this method, the document will be copied to the user-visible Documents directory inside the containing app’s sandbox.The default implementation of this method returns
nil.Declaration
Objective-C
- (nullable NSURL *)destinationURLforDocumentAtURL:(nonnull NSURL *)sourceURL;Swift
func destinationURLforDocument(at sourceURL: URL) -> URL?Parameters
sourceURLThe source URL of the document
Return Value
the destination URL for the document
-
Returns whether the cached document at the given URL should be deleted. If the cached document has been exported to a different location, as indicated by the
-shouldExportCachedDocumentAtURL:and-destinationURLforDocumentAtURL:methods, the original copy of the document can be deleted by returningYESfor this method.If it is desired that HTTP(S) documents should not be re-downloaded unless necessary (ie. unless the remote file has changed since it was last downloaded), then the cached document should not be deleted.
The default implementation of this method returns
NO.Declaration
Objective-C
- (BOOL)shouldDeleteCachedDocumentAtURL:(nonnull NSURL *)cachedDocumentURL;Swift
func shouldDeleteCachedDocument(at cachedDocumentURL: URL) -> BoolParameters
cachedDocumentURLThe URL of the cached document
-
Returns whether the controls should be hidden in response to a timer (if the
automaticallyHidesControlsproperty is enabled) or user tap (if thehidesControlsOnTapproperty is enabled).The default implementation of this method returns
YESif this view controller is not currently presenting another view controller and does not have another modal-type control active.Declaration
Objective-C
- (BOOL)shouldHideControls;Swift
func shouldHideControls() -> BoolReturn Value
YESif the view controller’s controls should be hidden,NOotherwise -
Returns whether the view controller’s controls should be shown in response to a user tap (if the
hidesControlsOnTapproperty is enabled).The default implementation of this method return
YESif this view controller’s containingUINavigationControllercurrently has its navigation bar hidden and no other view controllers are currently presented.Declaration
Objective-C
- (BOOL)shouldShowControls;Swift
func shouldShowControls() -> BoolReturn Value
YESif the view controller’s controls should be shown,NOotherwise. -
Called when the hidden state of the controls has actually been changed.
Declaration
Objective-C
- (void)didSetControlsHidden:(BOOL)hidden animated:(BOOL)animated;Swift
func didSetControlsHidden(_ hidden: Bool, animated: Bool)Parameters
hiddenThe new hidden state of the controls
animatedWhether the change was animated
-
Returns whether the text search view controller should be dismissed when the view controller’s view disappears.
The default implementation of this method returns
YES.Declaration
Objective-C
- (BOOL)shouldAutomaticallyDismissSearchViewController;Swift
func shouldAutomaticallyDismissSearch() -> BoolReturn Value
YESif the view controller’s controls should be hidden,NOotherwise
PTDocumentBaseViewController Class Reference