PSPDFScrubberBar
Objective-C
@interface PSPDFScrubberBar : UIView <PSPDFOverridable>
Swift
class ScrubberBar : UIView, Overridable
PDF thumbnail scrubber bar - similar to Apple Books.
-
The delegate for touch events
Declaration
Objective-C
@property (nonatomic, weak) id<PSPDFScrubberBarDelegate> _Nullable delegate;
Swift
weak var delegate: ScrubberBarDelegate? { get set }
-
The data source.
Declaration
Objective-C
@property (nonatomic, weak) id<PSPDFPresentationContext> _Nullable dataSource;
Swift
weak var dataSource: PresentationContext? { get set }
-
Whether this is a horizontally or vertically laid out scrubber bar — defaults to horizontal.
Note
CustomizingscrubberBarType
is supported only whenthumbnailBarMode
in the data source isPSPDFThumbnailBarModeScrubberBar
. Otherwise, setting this property to any value other thanPSPDFScrubberBarTypeHorizontal
won’t have any effect.Declaration
Objective-C
@property (nonatomic) PSPDFScrubberBarType scrubberBarType;
Swift
var scrubberBarType: ScrubberBarType { 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.
-
Current selected page.
Declaration
Objective-C
@property (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 (nonatomic) BOOL allowTapsOutsidePageArea;
Swift
var allowTapsOutsidePageArea: Bool { get set }
-
Appearance style to be used by the for the standard height toolbar. Inferred from the dataSource by default.
Declaration
Objective-C
@property (nonatomic, nullable) UIToolbarAppearance *standardAppearance;
Swift
var standardAppearance: UIToolbarAppearance? { get set }
-
Appearance style to be used by the for the compact height toolbar. Inferred from the dataSource by default.
Declaration
Objective-C
@property (nonatomic, nullable) UIToolbarAppearance *compactAppearance;
Swift
var compactAppearance: UIToolbarAppearance? { get set }
-
Left border margin. Defaults to
thumbnailMargin
. Set higher to allow custom buttons.Declaration
Objective-C
@property (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 (nonatomic) CGFloat rightBorderMargin;
Swift
var rightBorderMargin: CGFloat { get set }
-
Margin between thumbnails. Defaults to 2.
Declaration
Objective-C
@property (nonatomic) CGFloat thumbnailMargin;
Swift
var thumbnailMargin: CGFloat { get set }
-
Size multiplier for the current page thumbnail. Defaults to 1.35.
Declaration
Objective-C
@property (nonatomic) CGFloat pageMarkerSizeMultiplier;
Swift
var pageMarkerSizeMultiplier: CGFloat { get set }
-
Thumbnail border color. Defaults to a lighter (#A9AEB7) and a darker (#606671) shade of gray in light and dark mode respectively.
Declaration
Objective-C
@property (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 (nonatomic, readonly) UIToolbar *_Nonnull toolbar;
Swift
var toolbar: UIToolbar { get }
-
Returns toolbar height. Defaults to the
intrinsicContentSize
height ofUIToolbar
.Declaration
Objective-C
@property (nonatomic, readonly) CGFloat scrubberBarHeight;
Swift
var scrubberBarHeight: CGFloat { get }
-
Returns size of the thumbnails. This depends on the
scrubberBarHeight
.Declaration
Objective-C
@property (nonatomic, readonly) CGSize scrubberBarThumbSize;
Swift
var scrubberBarThumbSize: CGSize { get }
-
An image view that should be used when thumbnail images are still loading. Called once for every thumbnail image. This is not strictly a property because it is expected to return a new object on each call.
Declaration
Objective-C
@property (nonatomic, readonly) UIImageView *_Nonnull emptyThumbnailImageView;
Swift
var emptyThumbnailImageView: UIImageView { get }