PSPDFPageLabelView


@interface PSPDFPageLabelView : PSPDFLabelView

Displays the current page position at the bottom of the screen. - note: This class connects to the pdfController via KVO.

  • Action delegate.

    Declaration

    Objective-C

    @property (readwrite, nonatomic)
        id<PSPDFPageLabelViewDelegate> _Nullable delegate;

    Swift

    weak var delegate: PSPDFPageLabelViewDelegate? { get set }
  • Show button to show the thumbnail grid on the right side of the label. Defaults to NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL showThumbnailGridButton;

    Swift

    var showThumbnailGridButton: Bool { get set }
  • The thumbnail grid button, if showThumbnailGridButton is enabled. Manually wire up to a target/selector.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UIButton *_Nonnull thumbnailGridButton;

    Swift

    var thumbnailGridButton: UIButton { get set }
  • Equal to thumbnailButton.tintColor, but can also be used with UIAppearance. Defaults to black.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) UIColor *_Nonnull thumbnailButtonColor;

    Swift

    var thumbnailButtonColor: UIColor { get set }
  • Update the page label. Returns YES if label changed.

    Declaration

    Objective-C

    - (BOOL)updateLabelWithDocument:(nonnull PSPDFDocument *)document
                          pageIndex:(NSUInteger)pageIndex
                 visiblePageIndexes:
                     (nonnull NSOrderedSet<NSNumber *> *)visiblePageIndexes;

    Swift

    func updateLabel(with document: PSPDFDocument, pageIndex: UInt, visiblePageIndexes: NSOrderedSet) -> Bool
  • Helper that displays the correct page(s) and/or page labels.

    Declaration

    Objective-C

    - (nonnull NSString *)pageLabelWithDocument:(nonnull PSPDFDocument *)document
                                      pageIndex:(NSUInteger)pageIndex
                             visiblePageIndexes:(nonnull NSOrderedSet<NSNumber *> *)
                                                    visiblePageIndexes;

    Swift

    func pageLabel(with document: PSPDFDocument, pageIndex: UInt, visiblePageIndexes: NSOrderedSet) -> String
  • Calculates the new frame of this view and its subviews. Subclass to change frame position.

    Declaration

    Objective-C

    - (void)updateFrame;

    Swift

    func updateFrame()