PSPDFScrubberBar


@interface PSPDFScrubberBar : UIView

PDF thumbnail scrubber bar - similar to iBooks.

  • The delegate for touch events

    Declaration

    Objective-C

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

    Swift

    weak var delegate: PSPDFScrubberBarDelegate? { get set }
  • The data source.

    Declaration

    Objective-C

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

    Swift

    weak var dataSource: PSPDFPresentationContext? { get set }
  • Whether this is a horizontally or vertically laid out scrubber bar — defaults to horizontal.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) PSPDFScrubberBarType scrubberBarType;

    Swift

    var scrubberBarType: PSPDFScrubberBarType { get set }
  • Updates toolbar, re-aligns page screenshots. Registers in the runloop and works later.

    Declaration

    Objective-C

    - (void)updateToolbarAnimated:(BOOL)animated;

    Swift

    func updateToolbar(animated: Bool)
  • Instantly* updates toolbar.

    Declaration

    Objective-C

    - (void)updateToolbarForced;

    Swift

    func updateToolbarForced()
  • Deprecated

    Deprecated in PSPDFKit 7.3 for iOS. This method no longer updates the page index. Instead the page index is set internally when it changes which then calls this method. Starting with 7.3 it is no longer necessary to call this method yourself.

    Updates the page marker.

    Declaration

    Objective-C

    - (void)updatePageMarker;

    Swift

    func updatePageMarker()
  • Current selected page.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) PSPDFPageIndex pageIndex;

    Swift

    var pageIndex: PageIndex { get set }
  • Taps left/right of the pages area (if there aren’t enough pages to fill up space) by default count as first/last page. Defaults to YES.

    Declaration

    Objective-C

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

    Swift

    var allowTapsOutsidePageArea: Bool { get set }
  • The background tintColor. Defaults to the PSPDFViewController navigationBar barTintColor (if available).

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable) UIColor *barTintColor;

    Swift

    var barTintColor: UIColor? { get set }
  • If set to a nonzero value, the scrubber bar will render with the standard translucency - blur effect. Inferred from the dataSource by default.

    Declaration

    Objective-C

    @property (getter=isTranslucent, assign, readwrite, nonatomic) BOOL translucent;

    Swift

    var isTranslucent: Bool { get set }
  • Left border margin. Defaults to thumbnailMargin. Set higher to allow custom buttons.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat leftBorderMargin;

    Swift

    var leftBorderMargin: CGFloat { get set }
  • Right border margin. Defaults to thumbnailMargin. Set higher to allow custom buttons.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat rightBorderMargin;

    Swift

    var rightBorderMargin: CGFloat { get set }
  • Thumbnail border color. Defaults to UIColor.blackColor.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable) UIColor *thumbnailBorderColor;

    Swift

    var thumbnailBorderColor: UIColor? { get set }
  • Access the internally used toolbar. Can be used to customize the background appearance.

    Note

    If you override this to return — e.g. — an instance of a custom toolbar class, be aware that the default implementation makes itself the delegate of the toolbar to support drawing a bezel along the appropriate edge.

    Declaration

    Objective-C

    @property (readonly, nonatomic) UIToolbar *_Nonnull toolbar;

    Swift

    var toolbar: UIToolbar { get }
  • Returns YES if toolbar is in landscape+iPhone mode.

    Declaration

    Objective-C

    @property (readonly, getter=isSmallToolbar, nonatomic) BOOL smallToolbar;

    Swift

    var isSmallToolbar: Bool { get }
  • Returns toolbar height. (depending on isSmallToolbar)

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGFloat scrubberBarHeight;

    Swift

    var scrubberBarHeight: CGFloat { get }
  • Returns size of the bottom thumbnails. (depending on isSmallToolbar)

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGSize scrubberBarThumbSize;

    Swift

    var scrubberBarThumbSize: CGSize { get }
  • Called once for every thumbnail image.

    Declaration

    Objective-C

    @property (readonly, nonatomic) UIImageView *_Nonnull emptyThumbnailImageView;

    Swift

    var emptyThumbnailImageView: UIImageView { get }
  • Called upon touches and drags on the thumbnails.

    Declaration

    Objective-C

    - (BOOL)processTouch:(nonnull UITouch *)touch;

    Swift

    func processTouch(_ touch: UITouch) -> Bool
  • Margin between thumbnails. Defaults to 2.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat thumbnailMargin;

    Swift

    var thumbnailMargin: CGFloat { get set }
  • Size multiplier for the current page thumbnail. Defaults to 1.35.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat pageMarkerSizeMultiplier;

    Swift

    var pageMarkerSizeMultiplier: CGFloat { get set }