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, readwrite)
        id<PSPDFThumbnailBarDelegate> _Nullable thumbnailBarDelegate;

    Swift

    weak var thumbnailBarDelegate: ThumbnailBarDelegate? { get set }
  • The data source.

    Declaration

    Objective-C

    @property (nonatomic, weak, readwrite)
        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.

    Declaration

    Objective-C

    - (void)stopScrolling;

    Swift

    func stopScrolling()
  • Reload and keep the selection

    Declaration

    Objective-C

    - (void)reloadDataAndKeepSelection;

    Swift

    func reloadDataAndKeepSelection()
  • Thumbnail size. Defaults to 88x125 on iPad and 53x75 on iPhone.

    Note

    In most cases changing the thumbnailSize should also imply changing the thumbnailBarHeight. To propagate the update, call updateThumbnailBarFrameAnimated: on the parent PSPDFUserInterfaceView.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite) 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, call updateThumbnailBarFrameAnimated: on the parent PSPDFUserInterfaceView.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite)
        CGFloat thumbnailBarHeight;

    Swift

    var thumbnailBarHeight: CGFloat { get set }
  • Show page labels. Defaults to NO.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite) BOOL showPageLabels;

    Swift

    var showPageLabels: Bool { get set }