PTThumbnailsViewController
@interface PTThumbnailsViewController
: UIViewController <PTOverridable, UICollectionViewDataSource,
UICollectionViewDelegateFlowLayout,
UIPopoverPresentationControllerDelegate>
Displays a grid of thumbnails that can be used for navigation, plus re-arranging and deleting pages.
-
Initializes a new instance of the class.
Declaration
Objective-C
- (nonnull instancetype)initWithPDFViewCtrl: (nonnull PTPDFViewCtrl *)pdfViewCtrl;Swift
init(pdfViewCtrl: PTPDFViewCtrl)Parameters
pdfViewCtrlThe
PTPDFViewCtrlinstance that the control will coordinate with. -
Initializes a new instance of the class.
Declaration
Objective-C
- (nonnull instancetype)initWithToolManager: (nonnull PTToolManager *)toolManager;Swift
convenience init(toolManager: PTToolManager)Parameters
toolManagerThe
PTToolManagerinstance that the control will coordinate with. -
The
PTPDFViewCtrlassociated with the thumbnailsDeclaration
Objective-C
@property (nonatomic, strong, readonly) PTPDFViewCtrl *_Nonnull pdfViewCtrl;Swift
var pdfViewCtrl: PTPDFViewCtrl { get } -
The collection view object managed by this view controller.
Declaration
Objective-C
@property (nonatomic, strong, readonly) UICollectionView *_Nonnull collectionView;Swift
var collectionView: UICollectionView { get } -
The
PTAddPagesViewControllermanaged by this view controller.Declaration
Objective-C
@property (nonatomic, strong) PTAddPagesViewController *_Nonnull addPagesViewController;Swift
var addPagesViewController: PTAddPagesViewController { get set } -
Whether editing of thumbnails is allowed. The default is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isEditingEnabled) BOOL editingEnabled;Swift
var isEditingEnabled: Bool { get set } -
Whether editing of thumbnails is supported. Some modes of opperation do not support editing and so the edit button will be disabled even if
editingEnabledis true.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readonly, getter=isEditingSupported) BOOL editingSupported;Swift
var isEditingSupported: Bool { get } -
Whether adding pages is allowed. The default is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isAddPagesEnabled) BOOL addPagesEnabled;Swift
var isAddPagesEnabled: Bool { get set } -
Whether exporting pages is allowed. The default is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isExportPagesEnabled) BOOL exportPagesEnabled;Swift
var isExportPagesEnabled: Bool { get set } -
Whether rotating pages is allowed. The default is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isRotatePagesEnabled) BOOL rotatePagesEnabled;Swift
var isRotatePagesEnabled: Bool { get set } -
Whether deleting pages is allowed. The default is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isDeletePagesEnabled) BOOL deletePagesEnabled;Swift
var isDeletePagesEnabled: Bool { get set } -
Whether duplicating pages is allowed. The default is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isDuplicatePagesEnabled) BOOL duplicatePagesEnabled;Swift
var isDuplicatePagesEnabled: Bool { get set } -
An ordered set of
PTFilterModeenums used to filter the thumbnails.If the set contains fewer than two filter modes then the filter control will not be shown.
Declaration
Objective-C
@property (nonatomic, copy, nullable) NSOrderedSet<PTFilterMode> *filterModes;Swift
@NSCopying var filterModes: NSOrderedSet? { get set } -
The currently selected filter mode.
Declaration
Objective-C
@property (nonatomic, copy) PTFilterMode _Nonnull filterMode;Swift
var filterMode: PTFilterMode { get set } -
Rotates the selected pages clockwise.
Declaration
Objective-C
- (void)rotatePagesClockwise;Swift
func rotatePagesClockwise() -
Rotates the selected pages clockwise.
Declaration
Objective-C
- (void)rotatePagesCounterClockwise;Swift
func rotatePagesCounterClockwise() -
If the done button should be shown.
Declaration
Objective-C
- (BOOL)showsDoneButton;Swift
func showsDoneButton() -> Bool -
Called when something happens that indicates the title might need to update
Declaration
Objective-C
- (void)updateTitle;Swift
func updateTitle() -
Update the items in the toolbar
Declaration
Objective-C
- (void)updateBarButtonItems:(BOOL)animated;Swift
func updateBarButtonItems(_ animated: Bool) -
Associates a thumbnail image with a page number
Declaration
Objective-C
- (void)setThumbnail:(nonnull UIImage *)image forPage:(NSInteger)pageNum;Swift
func setThumbnail(_ image: UIImage, forPage pageNum: Int)Parameters
imageThe image of the page.
pageNumThe page number of the page.
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithNibName:(nullable NSString *)nibNameOrNil bundle:(nullable NSBundle *)nibBundleOrNil NS_UNAVAILABLE; -
Undocumented
Declaration
Objective-C
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE; -
Undocumented
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;
PTThumbnailsViewController Class Reference