PSPDFUserInterfaceView

The user interface view overlay for the PDFViewController. Contains the thumbnail and page/title label overlays.

  • Convenience initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFrame:(CGRect)frame
                               dataSource:
                                   (nonnull id<PSPDFPresentationContext>)dataSource;

    Swift

    init(frame: CGRect, dataSource: PresentationContext)
  • The data source.

    Declaration

    Objective-C

    @property (nonatomic, weak) id<PSPDFPresentationContext> _Nullable dataSource;

    Swift

    weak var dataSource: PresentationContext? { get set }
  • Force subview updating.

    Declaration

    Objective-C

    - (void)layoutSubviewsAnimated:(BOOL)animated;

    Swift

    func layoutSubviews(animated: Bool)
  • Fetches data again

    Declaration

    Objective-C

    - (void)reloadData;

    Swift

    func reloadData()
  • Specifies the distance between the subviews shown at the bottom and the top of the scrubber bar or the bottom of the screen, depending on whether the scrubber bar is enabled. Defaults to 0 on top, 10 on the bottom, and 20 on the right and left side on iPad, or 10 on the right and left side on all other devices.

    Note

    The subviews shown at the bottom include the page label along with the backward, forward and apply redaction buttons.

    Declaration

    Objective-C

    @property (nonatomic) UIEdgeInsets pageLabelInsets;

    Swift

    var pageLabelInsets: UIEdgeInsets { get set }
  • Specifies the distance between the top document label. Defaults to 10,5,0,5.

    Declaration

    Objective-C

    @property (nonatomic) UIEdgeInsets documentLabelInsets;

    Swift

    var documentLabelInsets: UIEdgeInsets { get set }
  • Insets from self.frame when positioning the scrubber bar. Defaults to 0,0,0,0.

    If you use this to move the scrubber bar above its default position at the bottom of the screen then the bar may stay visible when entering the thumbnails view mode. We recommend hiding the scrubber bar by changing the configuration’s thumbnailBarMode in the delegate method pdfViewController(_ pdfController: PDFViewController, didChange viewMode: ViewMode).

    Declaration

    Objective-C

    @property (nonatomic) UIEdgeInsets scrubberBarInsets;

    Swift

    var scrubberBarInsets: UIEdgeInsets { get set }
  • Document title label view.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFDocumentLabelView *_Nonnull documentLabel;

    Swift

    var documentLabel: DocumentLabelView { get }
  • Document page label view.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFPageLabelView *_Nonnull pageLabel;

    Swift

    var pageLabel: PageLabelView { get }
  • Scrubber bar. Created lazily. Available if PSPDFThumbnailBarModeScrubberBar is set.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFScrubberBar *_Nonnull scrubberBar;

    Swift

    var scrubberBar: ScrubberBar { get }
  • Thumbnail bar. Created lazily. Available if PSPDFThumbnailBarModeScrollable is set.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFThumbnailBar *_Nonnull thumbnailBar;

    Swift

    var thumbnailBar: ThumbnailBar { get }
  • Back navigation button (PSPDFAction history). Automatically shown / hidden.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFBackForwardButton *_Nonnull backButton;

    Swift

    var backButton: BackForwardButton { get }
  • Forward navigation button (PSPDFAction history). Automatically shown / hidden.

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFBackForwardButton *_Nonnull forwardButton;

    Swift

    var forwardButton: BackForwardButton { get }
  • Redaction info button. Shown in the lower trailing corner. Shows a popover to preview or apply uncommitted redaction annotations in the document, when tapped.

    Will only be shown if

    Declaration

    Objective-C

    @property (nonatomic, readonly) PSPDFStyleButton *_Nonnull redactionInfoButton;

    Swift

    var redactionInfoButton: StyleButton { get }
  • Update these to manually set the frame.

    dataSource will not be nil when these methods are called.

    Declaration

    Objective-C

    - (void)updateDocumentLabelFrameAnimated:(BOOL)animated;

    Swift

    func updateDocumentLabelFrame(animated: Bool)
  • Undocumented

    Declaration

    Objective-C

    - (void)updateThumbnailBarFrameAnimated:(BOOL)animated;

    Swift

    func updateThumbnailBarFrame(animated: Bool)
  • Undocumented

    Declaration

    Objective-C

    - (void)updateScrubberBarFrameAnimated:(BOOL)animated;

    Swift

    func updateScrubberBarFrame(animated: Bool)
  • Use this method to customize the position of the page label.

    Note

    The default implementation also sizes the label appropriately. Please call super and then change only the position of the label.

    Declaration

    Objective-C

    - (void)updatePageLabelFrameAnimated:(BOOL)animated;

    Swift

    func updatePageLabelFrame(animated: Bool)