PSPDFThumbnailBar
Objective-C
@interface PSPDFThumbnailBar
: UICollectionView <UICollectionViewDataSource, UICollectionViewDelegate,
PSPDFOverridable>
Swift
class ThumbnailBar : UICollectionView, UICollectionViewDataSource, UICollectionViewDelegate, Overridable
Bottom bar that shows a scrollable list of thumbnails.
-
Delegate for the thumbnail controller.
Declaration
Objective-C
@property (nonatomic, weak) id<PSPDFThumbnailBarDelegate> _Nullable thumbnailBarDelegate;
Swift
weak var thumbnailBarDelegate: ThumbnailBarDelegate? { get set }
-
The data source.
Declaration
Objective-C
@property (nonatomic, weak) id<PSPDFPresentationContext> _Nullable thumbnailBarDataSource;
Swift
weak var thumbnailBarDataSource: PresentationContext? { get set }
-
Scrolls to specified page in the grid and centers the selected page.
Declaration
Objective-C
- (void)scrollToPageAtIndex:(PSPDFPageIndex)pageIndex animated:(BOOL)animated;
Swift
func scrollToPage(at pageIndex: PageIndex, animated: Bool)
-
Stops an ongoing scroll animation.
-
Reload and keep the selection
-
Reload specific pages. Animated property is currently being ignored, changes via this API always animate.
Declaration
Objective-C
- (void)reloadPagesAtIndexes:(nonnull NSIndexSet *)indexes animated:(BOOL)animated;
Swift
func reloadPages(at indexes: IndexSet, animated: Bool)
Parameters
indexes
The page indexes that should be reloaded.
animated
Optionally animates the changes. Currently this is unsupported and changes will always be animated for single page reloads.
-
Thumbnail size. Defaults to 88x125 on iPad and 53x75 on iPhone.
Note
In most cases changing thethumbnailSize
should also imply changing thethumbnailBarHeight
. To propagate the update, callupdateThumbnailBarFrameAnimated:
on the parentPSPDFUserInterfaceView
.Declaration
Objective-C
@property (nonatomic) CGSize thumbnailSize;
Swift
var thumbnailSize: CGSize { get set }
-
Set the default height of the thumbnail bar. Defaults to 135 on iPad and 85 on iPhone.
Note
To propagate the update, callupdateThumbnailBarFrameAnimated:
on the parentPSPDFUserInterfaceView
.Declaration
Objective-C
@property (nonatomic) CGFloat thumbnailBarHeight;
Swift
var thumbnailBarHeight: CGFloat { get set }
-
Show page labels. Defaults to NO.
Declaration
Objective-C
@property (nonatomic) BOOL showPageLabels;
Swift
var showPageLabels: Bool { get set }