PSPDFPresentationContext

Objective-C

@protocol PSPDFPresentationContext <
    PSPDFOverridable, PSPDFVisiblePagesDataSource, PSPDFErrorHandler>

Swift

protocol PresentationContext : ErrorHandler, Overridable, VisiblePagesDataSource

The presentation context is used to provide several parts of the framework with information about what is currently presented in the corresponding PDFViewController.

Note

You should never implement PSPDFPresentationContext yourself, instead it is created by the framework and handed to you in several places when needed.
  • Accesses the configuration object.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) PSPDFConfiguration *_Nonnull configuration;

    Swift

    @NSCopying var configuration: PDFConfiguration { get }
  • Access the PSPDFKit singleton store.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFKitGlobal *_Nonnull pspdfkit;

    Swift

    var pspdfkit: PSPDFKitGlobal { get }
  • The displaying view controller and popover/half modal controllers.

    Declaration

    Objective-C

    @property (nonatomic, readonly) UIViewController<PSPDFPresentationActions> *_Nonnull displayingViewController;

    Swift

    var displayingViewController: UIViewController & PresentationActions { get }
  • Undocumented

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFDocumentViewController *documentViewController

    Swift

    var documentViewController: PSPDFDocumentViewController { get }
  • The associated document.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) PSPDFDocument *document;

    Swift

    var document: Document? { get }
  • Current view mode;

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFViewMode viewMode;

    Swift

    var viewMode: ViewMode { get }
  • Frame for the visible content, without navigation bar, status bar, side bar.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGRect contentRect;

    Swift

    var contentRect: CGRect { get }
  • Defines if a rotation is currently happening.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isRotationActive) BOOL rotationActive;

    Swift

    var isRotationActive: Bool { get }
  • Defines if the user interface is visible.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isUserInterfaceVisible) BOOL userInterfaceVisible;

    Swift

    var isUserInterfaceVisible: Bool { get }
  • Defines if viewWillAppear is currently being called.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isViewWillAppearing) BOOL viewWillAppearing;

    Swift

    var isViewWillAppearing: Bool { get }
  • Defines if the view is currently reloading.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isReloading) BOOL reloading;

    Swift

    var isReloading: Bool { get }
  • Defines if the view is loaded.

    Declaration

    Objective-C

    @property (nonatomic, readonly, getter=isViewLoaded) BOOL viewLoaded;

    Swift

    var isViewLoaded: Bool { get }
  • Currently visible page views.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSArray<PSPDFPageView *> *_Nonnull visiblePageViews;

    Swift

    var visiblePageViews: [PSPDFPageView] { get }
  • Returns the page view for the given page index. Will return nil if the page view is not loaded.

    Declaration

    Objective-C

    - (nullable PSPDFPageView *)pageViewForPageAtIndex:(PSPDFPageIndex)pageIndex;

    Swift

    func pageViewForPage(at pageIndex: PageIndex) -> PSPDFPageView?
  • Accesses the global annotation state manager.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFAnnotationStateManager *_Nonnull annotationStateManager;

    Swift

    var annotationStateManager: PSPDFAnnotationStateManager { get }
  • Annotation toolbar controller used for handling the annotation toolbar.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFAnnotationToolbarController *_Nonnull annotationToolbarController;

    Swift

    var annotationToolbarController: PSPDFAnnotationToolbarController { get }
  • Delegate for control handling.

    Declaration

    Objective-C

    @property (nonatomic, readonly) id<PSPDFControlDelegate> _Nonnull actionDelegate;

    Swift

    var actionDelegate: ControlDelegate { get }
  • Direct access to the PDFViewController if required.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFViewController *_Nonnull pdfController;

    Swift

    var pdfController: PSPDFViewController { get }