Other Protocols

The following protocols are available globally.

  • Protocol for analytics events consumers. Implement this protocol to forward analytics events to an analytics service of your choice. To receive events you must register your PSPDFAnalyticsClient instance with -[PSPDFAnalytics addAnalyticsClient:] method.

    See more

    Declaration

    Objective-C

    @protocol PSPDFAnalyticsClient

    Swift

    protocol PSPDFAnalyticsClient
  • To be notified on any changes PSPDFKit does on your annotations, implement this notifier. It will be set as soon as your class is added to the annotationManager.

    See more

    Declaration

    Objective-C

    @protocol PSPDFAnnotationProviderChangeNotifier <NSObject>

    Swift

    protocol PSPDFAnnotationProviderChangeNotifier : NSObjectProtocol
  • Delegate for callbacks related to annotation saving.

    See more

    Declaration

    Objective-C

    @protocol PSPDFAnnotationProviderDelegate <NSObject>

    Swift

    protocol PSPDFAnnotationProviderDelegate : NSObjectProtocol
  • The annotation state manager delegate is informed of state changes.

    Note

    The manager class supports registering multiple delegate implementations.
    See more

    Declaration

    Objective-C

    @protocol PSPDFAnnotationStateManagerDelegate <NSObject>

    Swift

    protocol PSPDFAnnotationStateManagerDelegate : NSObjectProtocol
  • Custom sub-protocol of UIScrollViewDelegate with additional optional callbacks.

    See more

    Declaration

    Objective-C

    @protocol PSPDFAvoidingScrollViewDelegate <UIScrollViewDelegate>

    Swift

    protocol PSPDFAvoidingScrollViewDelegate : UIScrollViewDelegate
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFBackForwardActionListDelegate<NSObject>
    
    /**
     Should execute the provided back actions in reverse order and also call `registerAction:`
     to register the inverse actions.
     */
    - (void)backForwardList:(PSPDFBackForwardActionList *)list requestedBackActionExecution:(NSArray<__kindof PSPDFAction *> *)actions;
    
    /**
     Should execute the provided forward actions in reverse order and also call `registerAction:`
     to register the inverse actions.
     */
    - (void)backForwardList:(PSPDFBackForwardActionList *)list requestedForwardActionExecution:(NSArray<__kindof PSPDFAction *> *)actions;
    
    @optional
    
    /// Called whenever `backList` or `forwardList` get updated.
    - (void)backForwardListDidUpdate:(PSPDFBackForwardActionList *)list;
    
    @end

    Swift

    protocol PSPDFBackForwardActionListDelegate : NSObjectProtocol
  • Delegate when we use inline cell editing.

    See more

    Declaration

    Objective-C

    @protocol PSPDFBookmarkTableViewCellDelegate <NSObject>

    Swift

    protocol PSPDFBookmarkTableViewCellDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFConflictResolutionManagerDelegate <NSObject>
    
    /**
     Invoked when the conflict resolution selection completes.
    
     The implementing object should resolve the file conflict (externally removed or modified file) using the
     selected conflict resolution option.
    
     Designed to be invoked from: `controllerForFileDeletionResolutionOnDocument:dataProvider:dataProvider:` and
     `controllerForExternalFileChangeResolutionOnDocument:dataProvider:dataProvider:`.
    
     @param manager A reference to the resolution manager that invoked this call.
     @param document The current document.
     @param dataProvider The document's data provider that detected the file change.
     @param resolution The conflict resolution option that should be performed.
     @param error An optional error describing the failure.
     @return YES, if the resolution was successful and no otherwise.
     */
    - (BOOL)resolutionManager:(PSPDFConflictResolutionManager *)manager requestingFileConflictResolutionForDocument:(PSPDFDocument *)document dataProvider:(id<PSPDFCoordinatedFileDataProviding>)dataProvider withResolution:(PSPDFFileConflictResolution)resolution error:(NSError **)error;
    
    @optional
    
    /**
     Specifies the controller that should be used for UI presentation.
    
     If not implemented, the topmost view controller reachable from the root view controller will be used.
    
     @note Called on the main thread.
    
     @param manager A reference to the resolution manager that invoked this call.
     @return A view controllerller suitable for modal UI presentation.
     */
    - (UIViewController *)viewControllerForPresentationForResolutionManager:(PSPDFConflictResolutionManager *)manager;
    
    @end

    Swift

    protocol PSPDFConflictResolutionManagerDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFContainerViewControllerDelegate<NSObject, PSPDFOverridable>
    
    @optional
    
    /// Called every time the index is changed.
    - (void)containerViewController:(PSPDFContainerViewController *)controller didUpdateSelectedIndex:(NSUInteger)selectedIndex;
    
    /// Returns a Boolean value that indicates whether prefer to use a View Controller title or an icon in a segmented control.
    - (BOOL)containerViewController:(PSPDFContainerViewController *)controller shouldUseTitleForViewController:(UIViewController *)viewController;
    
    @end

    Swift

    protocol PSPDFContainerViewControllerDelegate : PSPDFOverridable
  • Protocol for handling page changes.

    See more

    Declaration

    Objective-C

    @protocol PSPDFPageControls <NSObject>

    Swift

    protocol PSPDFPageControls : NSObjectProtocol
  • Protocol handling the user interface.

    See more

    Declaration

    Objective-C

    @protocol PSPDFUserInterfaceControls <NSObject>

    Swift

    protocol PSPDFUserInterfaceControls : NSObjectProtocol
  • Handles state changes for a given document.

    See more

    Declaration

    Objective-C

    @protocol PSPDFControllerStateHandling <NSObject>

    Swift

    protocol PSPDFControllerStateHandling : NSObjectProtocol
  • Delegate that can be implemented to be notified of changes that the document editor performs.

    See more

    Declaration

    Objective-C

    @protocol PSPDFDocumentEditorDelegate <NSObject>

    Swift

    protocol PSPDFDocumentEditorDelegate : NSObjectProtocol
  • A document feature source can disable various features if there are reasons within its controlled scope that make this feature unavailable.

    You can implement your own sources by conforming to this protocol. Besides the required methods you should only implement the features that your source actually control. The result of your source will be combined with the results of the framework’s sources through a logical AND. This means if your source disallows a feature this feature is no longer available, however if your source allows a feature there might still be other sources disallowing a feature. Only if all sources allow a feature, the feature will be enabled.

    Caching

    The results of all features you implement will be cached. Whenever the state of a feature changes, you need to call [features updateFeatures] for changes to take effect. This is also necessary to allow notifying interested observers about the change in state.

    Threading

    Your custom sources have to be thread safe. They are not guaranteed to be called on any particular queue.

    See more

    Declaration

    Objective-C

    @protocol PSPDFDocumentFeaturesSource <NSObject>

    Swift

    protocol PSPDFDocumentFeaturesSource : NSObjectProtocol
  • An observer will be returned to you when you start observing a feature for state changes. You can either keep the observer around for removing it later on or you can bind it to the lifetime of another class which will then remove the observer automatically when the other object gets deallocated.

    See more

    Declaration

    Objective-C

    @protocol PSPDFDocumentFeaturesObserver <NSObject>

    Swift

    protocol PSPDFDocumentFeaturesObserver : NSObjectProtocol
  • Conforming to this protocol indicated, that the view controller can be used in the document info coordinator.

    See more

    Declaration

    Objective-C

    @protocol PSPDFDocumentInfoController

    Swift

    protocol PSPDFDocumentInfoController
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFDocumentViewControllerDelegate <NSObject>
    @optional
    
    /**
     Called when the spread index changes.
    
     @note This method is called even if the spread index was modified programatically.
    
     @param documentViewController The document view controller whose spread index changed.
     @param oldSpreadIndex The old spread index, before it was changed.
     */
    - (void)documentViewController:(PSPDFDocumentViewController *)documentViewController didChangeSpreadIndex:(NSInteger)oldSpreadIndex;
    
    /**
     Called when the continuous spread index changes.
    
     @note This method is called constantly when scrolling. If you implement this method,
     it should be fast. It is called even if the continuous spread index was modified
     programatically.
    
     @param documentViewController The document view controller whose continuous spread index changed.
     @param oldContinuousSpreadIndex The old continuous spread index, before it was changed.
     */
    - (void)documentViewController:(PSPDFDocumentViewController *)documentViewController didChangeContinuousSpreadIndex:(CGFloat)oldContinuousSpreadIndex;
    
    /**
     Called whenever the zoom scale is updated.
    
     @note This method will be called rapidly while the user is actively zooming in or out.
           Make sure you do the minimum amount of work in this method.
    
     @param documentViewController The document view controller the change occurred in.
     @param zoomScale The new zoom scale.
     @param spreadIndex The index of the spread that was zoomed or `NSNotFound` if the
                        zooming view is responsible for multiple spread views.
     */
    - (void)documentViewController:(PSPDFDocumentViewController *)documentViewController didUpdateZoomScale:(CGFloat)zoomScale forSpreadAtIndex:(NSInteger)spreadIndex;
    
    /**
     Called when a spread view enters the bounds of the document view.
    
     A spread is considered visible if at least one pixel of it is inside the document
     view's bounds.
    
     @see `-documentViewController:didEndDisplayingSpreadView:forSpreadAtIndex:`
    
     @param documentViewController The document view controller the spread view belongs to.
     @param spreadView The spread view that is entering the visible bounds.
     @param spreadIndex The spread index the spread view represents.
     */
    - (void)documentViewController:(PSPDFDocumentViewController *)documentViewController willBeginDisplayingSpreadView:(PSPDFSpreadView *)spreadView forSpreadAtIndex:(NSInteger)spreadIndex;
    
    /**
     Called when a spread view leaves the bounds of the document view.
    
     A spread is considered visible if at least one pixel of it is inside the document
     view's bounds.
    
     @see `-documentViewController:willBeginDisplayingSpreadView:forSpreadAtIndex:`
    
     @param documentViewController The document view controller the spread view belongs to.
     @param spreadView The spread view that left the visible bounds.
     @param spreadIndex The spread index the spread view represents.
     */
    - (void)documentViewController:(PSPDFDocumentViewController *)documentViewController didEndDisplayingSpreadView:(PSPDFSpreadView *)spreadView forSpreadAtIndex:(NSInteger)spreadIndex;
    
    /**
     Called when a spread view is configured and added to the view hierarchy.
    
     @see `-documentViewController:didCleanupSpreadView:forSpreadAtIndex:`
    
     @param documentViewController The document view controller the spread view belongs to.
     @param spreadView The spread view that was configured.
     @param spreadIndex The spread index the spread view represents.
     */
    - (void)documentViewController:(PSPDFDocumentViewController *)documentViewController didConfigureSpreadView:(PSPDFSpreadView *)spreadView forSpreadAtIndex:(NSInteger)spreadIndex;
    
    /**
     Called when a spread view is cleaned up and removed from the view hierarchy.
    
     @see `-documentViewController:didConfigureSpreadView:forSpreadAtIndex:`
    
     @param documentViewController The document view controller the spread view belongs to.
     @param spreadView The spread view that was cleaned up.
     @param spreadIndex The spread index the spread view represents.
     */
    - (void)documentViewController:(PSPDFDocumentViewController *)documentViewController didCleanupSpreadView:(PSPDFSpreadView *)spreadView forSpreadAtIndex:(NSInteger)spreadIndex;
    
    /**
     Called when the document view controller is configuring the scroll view that is
     resposible for scrolling the spreads.
    
     @param documentViewController The document view controller the scroll view belongs to.
     @param scrollView The scroll view being configured.
     */
    - (void)documentViewController:(PSPDFDocumentViewController *)documentViewController configureScrollView:(UIScrollView *)scrollView;
    
    /**
     Called when the document view controller is configuring a scroll view that is responsible
     for zooming one or multiple spreads.
    
     @note In some layouts the zoom view is equal to the scroll view responsible for
           scrolling the spreads. Therefore configuring the zoom view can have an impact
           on the scrolling behavior.
    
     @param documentViewController The document view controller the zoom view belongs to.
     @param zoomView The zoom view being configured.
     @param spreadIndex The index of the spread the zoom view is displaying or `NSNotFound`
                        if the zoom view is responsible for multiple spreads.
     */
    - (void)documentViewController:(PSPDFDocumentViewController *)documentViewController configureZoomView:(UIScrollView *)zoomView forSpreadAtIndex:(NSInteger)spreadIndex;
    
    @end

    Swift

    protocol PSPDFDocumentViewControllerDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFDownloadManagerDelegate<NSObject>
    
    @optional
    
    /// If the delegate wants to handle authentication challenges.
    - (void)downloadManager:(PSPDFDownloadManager *)downloadManager authenticationChallenge:(NSURLAuthenticationChallenge *)authenticationChallenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler;
    
    /// Informs the delegate that the state of the given object has changed.
    ///
    /// @param downloadManager The download manager.
    /// @param object The changed object.
    - (void)downloadManager:(PSPDFDownloadManager *)downloadManager didChangeObject:(id<PSPDFRemoteContentObject>)object;
    
    /// Informs the delegate that the reachability has changed.
    ///
    /// @param downloadManager The download manager.
    /// @param reachability The new reachability.
    - (void)downloadManager:(PSPDFDownloadManager *)downloadManager reachabilityDidChange:(PSPDFReachability)reachability;
    
    @end

    Swift

    protocol PSPDFDownloadManagerDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFDownloadManagerPolicy<NSObject>
    
    /// Returns YES when we're allowed to use the network.
    @property (nonatomic, readonly) BOOL hasPermissionForNetworkEvent;
    
    @end

    Swift

    protocol PSPDFDownloadManagerPolicy : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFEraseOverlayDataSource<NSObject>
    
    /// The current zoom scale, for sharp rendering while zoomed in
    - (CGFloat)zoomScaleForEraseOverlay:(PSPDFEraseOverlay *)overlay;
    
    @end

    Swift

    protocol PSPDFEraseOverlayDataSource : NSObjectProtocol
  • The PSPDFExternalSignature protocol is adopted by an object that provides an external signature for a PDF document. You set the externalSignatureDelegate property in a PSPDFSigner class or subclass when you want to control the digital signing process with an external signature (for example, a signature that is implemented by a hardware device or by an external webservice).

    See more

    Declaration

    Objective-C

    @protocol PSPDFExternalSignature <NSObject>

    Swift

    protocol PSPDFExternalSignature : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFFlexibleToolbarDelegate<NSObject>
    
    @optional
    
    /// The toolbar container will be displayed (called before `showToolbarAnimated:completion:` is performed).
    - (void)flexibleToolbarWillShow:(PSPDFFlexibleToolbar *)toolbar;
    
    /// The toolbar container has been displayed (called after `showToolbarAnimated:completion:` is performed).
    - (void)flexibleToolbarDidShow:(PSPDFFlexibleToolbar *)toolbar;
    
    /// The toolbar container will be hidden (called before `hideToolbarAnimated:completion:` is performed).
    - (void)flexibleToolbarWillHide:(PSPDFFlexibleToolbar *)toolbar;
    
    /// The toolbar container has ben hidden (called after `hideToolbarAnimated:completion:` is performed).
    - (void)flexibleToolbarDidHide:(PSPDFFlexibleToolbar *)toolbar;
    
    /// Called whenever the flexible toolbar changes position in response to a user drag & drop action
    - (void)flexibleToolbar:(PSPDFFlexibleToolbar *)toolbar didChangePosition:(PSPDFFlexibleToolbarPosition)position;
    
    @end

    Swift

    protocol PSPDFFlexibleToolbarDelegate : NSObjectProtocol
  • Delegate for the flexible toolbar container.

    See more

    Declaration

    Objective-C

    @protocol PSPDFFlexibleToolbarContainerDelegate <NSObject>

    Swift

    protocol PSPDFFlexibleToolbarContainerDelegate : NSObjectProtocol
  • Designates common UIToolbar or UINavigationBar functionality.

    Declaration

    Objective-C

    @protocol PSPDFSystemBar <NSObject>

    Swift

    protocol PSPDFSystemBar : NSObjectProtocol
  • Delegate to receive actions from the free text accessory view.

    See more

    Declaration

    Objective-C

    @protocol PSPDFFreeTextAccessoryViewDelegate <NSObject>

    Swift

    protocol PSPDFFreeTextAccessoryViewDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFGalleryViewDataSource<NSObject>
    
    /// The number if items in a gallery.
    - (NSUInteger)numberOfItemsInGalleryView:(PSPDFGalleryView *)galleryView;
    
    /// The content view for the given index.
    - (PSPDFGalleryContentView *)galleryView:(PSPDFGalleryView *)galleryView contentViewForItemAtIndex:(NSUInteger)index;
    
    @end

    Swift

    protocol PSPDFGalleryViewDataSource : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFGalleryViewDelegate<UIScrollViewDelegate>
    
    @optional
    
    /// Called when `currentItemIndex` changes.
    - (void)galleryView:(PSPDFGalleryView *)galleryView willScrollToItemAtIndex:(NSUInteger)index;
    - (void)galleryView:(PSPDFGalleryView *)galleryView didScrollToItemAtIndex:(NSUInteger)index;
    
    /// Called before reusing a content view.
    - (void)galleryView:(PSPDFGalleryView *)galleryView willReuseContentView:(PSPDFGalleryContentView *)contentView;
    
    @end

    Swift

    protocol PSPDFGalleryViewDelegate : UIScrollViewDelegate
  • The delegate of a PSPDFInstantClient must adopt this protocol to be notified of download and authentication events.

    Delegates that are interested in events around the sync cycle can also implement the optional methods listed in the “Sync Events” section. For a more detailed explanation of the sync cycle of a document and its possible states, please refer to the documentation on PSPDFInstantDocumentState.

    If you need multiple observers or are only interested in the events of a single document, you can use the notifications posted by PSPDFInstantDocumentDescriptor.

    Note

    Important: All methods in this protocol will be called on a background thread!
    See more

    Declaration

    Objective-C

    @protocol PSPDFInstantClientDelegate <NSObject>

    Swift

    protocol PSPDFInstantClientDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFSettings<NSObject>
    
    ///// Allow generic array access.
    - (nullable id)objectForKeyedSubscript:(PSPDFSettingKey)key;
    
    /// Shortcut that returns booleans.
    - (BOOL)boolForKey:(PSPDFSettingKey)key;
    
    @end

    Swift

    protocol PSPDFSettings : NSObjectProtocol
  • The PSPDFLibraryDataSource protocol is adopted by an object that provides the documents to be indexed by a PSPDFLibrary. These methods will not be called on the main queue, and can take long to execute. If you are implementing this protocol yourself and not using PSPDFLibraryFileSystemDataSource, please read the documentation carefully.

    See more

    Declaration

    Objective-C

    @protocol PSPDFLibraryDataSource <NSObject>

    Swift

    protocol PSPDFLibraryDataSource : NSObjectProtocol
  • Delegate informing about state changes of the media player controller.

    See more

    Declaration

    Objective-C

    @protocol PSPDFMediaPlayerControllerDelegate <NSObject>

    Swift

    protocol PSPDFMediaPlayerControllerDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFMultiDocumentListControllerDelegate<NSObject>
    
    @optional
    
    /// Informs the delegate that the user selected a document from the list.
    /// Typically, the presenting view controller will implement this method to dismiss the multi-document list controller.
    ///
    /// @note The multi-document list controller automatically changes the visible document of its `tabbedViewController` at the same time as calling this method.
    - (void)multiDocumentListController:(PSPDFMultiDocumentListController *)multiDocumentListController didSelectDocumentAtIndex:(NSUInteger)idx;
    
    /// Informs the delegate that the user tapped the cancel button in the navigation bar containing the multi-document list controller.
    /// By default, the multi-document list controller sets a cancel button as the `leftBarButtonItem` of its `navigationItem`.
    /// This method will not be called if the multi-document list controller is not inside a navigation controller.
    - (void)multiDocumentListControllerDidCancel:(PSPDFMultiDocumentListController *)multiDocumentListController;
    
    @end

    Swift

    protocol PSPDFMultiDocumentListControllerDelegate : NSObjectProtocol
  • Delegate that allows connecting a PSPDFNewPageViewController to receive the event when a selection has been chosen.

    See more

    Declaration

    Objective-C

    @protocol PSPDFNewPageViewControllerDelegate <NSObject, PSPDFOverridable>

    Swift

    protocol PSPDFNewPageViewControllerDelegate : PSPDFOverridable
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFNewPageViewControllerDataSource<NSObject, PSPDFOverridable>
    
    @optional
    /**
     Optional method. Called when the new page view controller is being configured.
    
     The return value of this method's implementation is used to determine the correct
     title for the "Add page" button on the `PSPDFNewPageViewController` instance.
    
     @param controller  The controller that's calling this method.
    
     @return Integer with the index of the first item that's selected and will serve as insertion point reference. If no index is selected, return `NSNotFound`. If this method is not implemented, `NSNotFound` is used.
     */
    - (PSPDFPageIndex)selectedIndexForNewPageViewController:(PSPDFNewPageViewController *)controller;
    
    @end

    Swift

    protocol PSPDFNewPageViewControllerDataSource : PSPDFOverridable
  • The delegate of an outline cell.

    See more

    Declaration

    Objective-C

    @protocol PSPDFOutlineCellDelegate <NSObject>

    Swift

    protocol PSPDFOutlineCellDelegate : NSObjectProtocol
  • This protocol contains information about an image request.

    See more

    Declaration

    Objective-C

    @protocol PSPDFPageCellImageRequestToken <NSObject>

    Swift

    protocol PSPDFPageCellImageRequestToken : NSObjectProtocol
  • This protocol is responsible for loading images and providing it to the PSPDFPageCell whenever requested by it.

    See more

    Declaration

    Objective-C

    @protocol PSPDFPageCellImageLoading <NSObject>

    Swift

    protocol PSPDFPageCellImageLoading : NSObjectProtocol
  • The page grabber view protocol can be implemented by UIView subclasses. It enables an instance of PSPDFPageGrabber to communicate state changes to the view that implements this protocol, if the view is used as the page grabber’s grabberView.

    See more

    Declaration

    Objective-C

    @protocol PSPDFPageGrabberView <NSObject>

    Swift

    protocol PSPDFPageGrabberView : NSObjectProtocol
  • Handles touches of the thumbnail grid button in the page label view.

    See more

    Declaration

    Objective-C

    @protocol PSPDFPageLabelViewDelegate <NSObject>

    Swift

    protocol PSPDFPageLabelViewDelegate : NSObjectProtocol
  • The type implementing this protocol can receive updates from a PSPDFProcessor.

    See more

    Declaration

    Objective-C

    @protocol PSPDFProcessorDelegate <NSObject>

    Swift

    protocol PSPDFProcessorDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFRemoteContentObject<NSObject>
    
    /// The URL request used for loading the remote content.
    @property (nonatomic, readonly, nullable) NSURLRequest *URLRequestForRemoteContent;
    
    /// The remote content of the object. This property is managed by `PSPDFDownloadManager`.
    @property (nonatomic, nullable) id remoteContent;
    
    @optional
    
    /// The loading state of the object. This property is managed by `PSPDFDownloadManager`.
    @property (nonatomic, getter=isLoadingRemoteContent) BOOL loadingRemoteContent;
    
    /// The download progress of the object. Only meaningful if `loadingRemoteContent` is YES.
    /// This property is managed by `PSPDFDownloadManager`.
    @property (nonatomic) CGFloat remoteContentProgress;
    
    /// The remote content error of the object. This property is managed by `PSPDFDownloadManager`.
    @property (nonatomic, nullable) NSError *remoteContentError;
    
    /// Return YES if you want `PSPDFDownloadManager` to cache the remote content. Defaults to NO.
    @property (nonatomic, readonly) BOOL shouldCacheRemoteContent;
    
    /// Return YES if you want `PSPDFDownloadManager` to retry downloading remote content if a connection
    /// error occurred. Defaults to NO.
    @property (nonatomic, readonly) BOOL shouldRetryLoadingRemoteContentOnConnectionFailure;
    
    /// Return a block if you need to handle a authentication challenge.
    @property (nonatomic, readonly) PSPDFRemoteContentObjectAuthenticationBlock remoteContentAuthenticationChallengeBlock;
    
    /// Return a custom `PSPDFRemoteContentObjectTransformerBlock`. The passed-in `NSURL` points to the
    /// file that stores the downloaded data. The return value is set to `remoteContent`. If no transformer
    /// block is provided, `remoteContent` will be set to data (represented by `NSData`) of the downloaded
    /// content.
    ///
    /// @note If `shouldCacheRemoteContent` returns `YES` the location of the file is not temporary.
    /// @note `remoteContentTransformerBlock` will be called on a background queue, so you may perform
    /// long-running tasks.
    /// @warning Since this runs on a background queue, you should not access state outside of the block's
    /// scope to avoid thread-safety problems.
    @property (nonatomic, readonly, nullable) PSPDFRemoteContentObjectTransformerBlock remoteContentTransformerBlock;
    
    /// Return `YES` if the object actually has remote content. Since most `PSPDFRemoteContentObject`s
    /// will have remote content, this method is optional. If it is not implemented, `YES` will be assumed.
    @property (nonatomic, readonly) BOOL hasRemoteContent;
    
    /// The completion block, called after loading finished.
    @property (nonatomic, copy, nullable) void (^completionBlock)(id<PSPDFRemoteContentObject> remoteObject);
    
    @end

    Swift

    protocol PSPDFRemoteContentObject : NSObjectProtocol
  • Implement this delegate to get rendered pages. (Most of the times, you want to use PSPDFCache instead)

    See more

    Declaration

    Objective-C

    @protocol PSPDFRenderTaskDelegate <NSObject>

    Swift

    protocol PSPDFRenderTaskDelegate : NSObjectProtocol
  • Delegate to be notified on session begin/end and frame changes.

    See more

    Declaration

    Objective-C

    @protocol PSPDFResizableViewDelegate <NSObject>

    Swift

    protocol PSPDFResizableViewDelegate : NSObjectProtocol
  • Required methods for views that represent resizable view knobs.

    See more

    Declaration

    Objective-C

    @protocol PSPDFKnobView <NSObject>

    Swift

    protocol PSPDFKnobView : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFSaveViewControllerDelegate<NSObject>
    
    /// Called when the save or cancel button is pressed. The delegate should save the document requested.
    - (void)saveViewControllerDidEnd:(PSPDFSaveViewController *)controller shouldSave:(BOOL)shouldSave;
    
    @optional
    
    /// Allows the delegate to conditionally allow or prevent saving. Called after the save button is invoked.
    /// If a NSError object is assigned to the `error` reference, than an alert is shown with the error's
    /// `localizedDescription` as content.
    - (BOOL)saveViewControllerShouldSave:(PSPDFSaveViewController *)controller toPath:(NSString *)path error:(NSError **)error;
    
    @end

    Swift

    protocol PSPDFSaveViewControllerDelegate : NSObjectProtocol
  • Protocol for the annotation store implementation.

    See more

    Declaration

    Objective-C

    @protocol PSPDFAnnotationSetStore <NSObject>

    Swift

    protocol PSPDFAnnotationSetStore : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFScreenControllerDelegate<NSObject>
    
    @optional
    
    /**
     Started mirroring on `screen`.
    
     This delegate is called after the `UIWindow` has been created and the `rootViewController` is configured.
     Use this for additional customization.
    
     @note Replacing the `rootViewController` on the mirroring window is supported,
     as long as the `PSPDFViewController` is correctly registered as a child view controller.
    
     Use `mirrorControllerForScreen:` to access the window if required.
     */
    - (void)screenController:(PSPDFScreenController *)screenController didStartMirroringForScreen:(UIScreen *)screen;
    
    /**
     Stopped mirroring on `screen`.
    
     This delegate is called after the mirroring window is hidden and is about to be deallocated.
     */
    - (void)screenController:(PSPDFScreenController *)screenController didStopMirroringForScreen:(UIScreen *)screen;
    
    /**
     Implement this method to return a custom controller that should be used for mirroring.
     If you return a custom controller, ensure that it is configured correctly.
    
     This is called just before mirroring starts.
    
     @note The default implementation uses various sensible options such as
     hiding the thumbnail bar, document label and page label. It also completely mirrors the most relevant
     configuration settings of the original controller.
    
     @warning `PSPDFPageTransitionScrollPerSpread` is the only supported page mode for mirroring currently.
    
     Gallery considerations: We recommend at least following options to ensure the gallery works as expected:
        `builder.allowPlayingMultipleInstances = YES;`
        `builder.usesExternalPlaybackWhileExternalScreenIsActive = NO;`
     See `galleryConfiguration` on `PSPDFConfiguration` for details.
     */
    - (PSPDFViewController *)createPDFViewControllerForMirroring:(PSPDFScreenController *)screenController;
    
    /**
     This delegate can be used to decide wheter the mirrored controller should copy the configuration of the original controller or not.
    
     If not implemented, defaults to YES.
     */
    - (BOOL)screenController:(PSPDFScreenController *)screenController shouldSyncConfigurationTo:(PSPDFViewController *)mirroredPDFController;
    
    @end

    Swift

    protocol PSPDFScreenControllerDelegate : NSObjectProtocol
  • Implement this delegate to get notified of scrubber bar events.

    See more

    Declaration

    Objective-C

    @protocol PSPDFScrubberBarDelegate <NSObject>

    Swift

    protocol PSPDFScrubberBarDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFSelectionViewDelegate<NSObject>
    
    @optional
    
    /// Called before we start selecting. If we return NO here, no selection will be drawn (but delegates will still be called)
    - (BOOL)selectionView:(PSPDFSelectionView *)selectionView shouldStartSelectionAtPoint:(CGPoint)point;
    
    /// Rect is updated. (`touchesMoved:`)
    - (void)selectionView:(PSPDFSelectionView *)selectionView updateSelectedRect:(CGRect)rect;
    
    /// Called when a rect was selected successfully. (`touchesEnded:`)
    - (void)selectionView:(PSPDFSelectionView *)selectionView finishedWithSelectedRect:(CGRect)rect;
    
    /// Called when rect selection was cancelled. (`touchesCancelled:`)
    - (void)selectionView:(PSPDFSelectionView *)selectionView cancelledWithSelectedRect:(CGRect)rect;
    
    /// Called when we did a single tap in the selection view (via tap gesture recognizer)
    - (void)selectionView:(PSPDFSelectionView *)selectionView singleTappedWithGestureRecognizer:(UITapGestureRecognizer *)gestureRecognizer;
    
    @end

    Swift

    protocol PSPDFSelectionViewDelegate : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol PSPDFStylusViewControllerDelegate<NSObject>
    
    /// The driver class has been changed.
    - (void)stylusViewControllerDidUpdateSelectedType:(PSPDFStylusViewController *)stylusViewController;
    
    /// The settings button has been tapped.
    - (void)stylusViewControllerDidTapSettingsButton:(PSPDFStylusViewController *)stylusViewController;
    
    @end

    Swift

    protocol PSPDFStylusViewControllerDelegate : NSObjectProtocol
  • Search status delegate. All delegates are guaranteed to be called within the main thread.

    See more

    Declaration

    Objective-C

    @protocol PSPDFTextSearchDelegate <NSObject>

    Swift

    protocol PSPDFTextSearchDelegate : NSObjectProtocol
  • Delegate for thumbnail actions.

    See more

    Declaration

    Objective-C

    @protocol PSPDFThumbnailBarDelegate <NSObject>

    Swift

    protocol PSPDFThumbnailBarDelegate : NSObjectProtocol
  • Delegate for the collection view thumbnail flow layout.

    See more

    Declaration

    Objective-C

    @protocol PSPDFCollectionViewDelegateThumbnailFlowLayout <NSObject>

    Swift

    protocol PSPDFCollectionViewDelegateThumbnailFlowLayout : NSObjectProtocol
  • Delegate for thumbnail actions.

    See more

    Declaration

    Objective-C

    @protocol PSPDFThumbnailViewControllerDelegate <NSObject>

    Swift

    protocol PSPDFThumbnailViewControllerDelegate : NSObjectProtocol