PSPDFDocumentEditorToolbar
Objective-C
@interface PSPDFDocumentEditorToolbar : PSPDFFlexibleToolbar <PSPDFOverridable>
Swift
class PDFDocumentEditorToolbar : FlexibleToolbar, Overridable
A flexible toolbar with various document editing functions.
The default toolbar position will be .right
on visionOS, and .inTopBar
on all other platforms and configurations.
Note
This class requires the Document Editor component to be enabled for your license.-
Preset button for showing the new page UI.
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFToolbarButton *_Nonnull addPageButton;
Swift
var addPageButton: PSPDFToolbarButton { get }
-
Preset button for deleting selected pages.
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFToolbarButton *_Nonnull deletePagesButton;
Swift
var deletePagesButton: PSPDFToolbarButton { get }
-
Preset button for duplicating selected pages.
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFToolbarButton *_Nonnull duplicatePagesButton;
Swift
var duplicatePagesButton: PSPDFToolbarButton { get }
-
Preset button for rotating selected pages 90 clockwise.
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFToolbarButton *_Nonnull rotatePagesButton;
Swift
var rotatePagesButton: PSPDFToolbarButton { get }
-
Preset button for exporting selected pages into a new PDF file.
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFToolbarButton *_Nonnull exportPagesButton;
Swift
var exportPagesButton: PSPDFToolbarButton { get }
-
Preset button for selecting or deselecting all pages.
See
allPagesSelected
.Declaration
Objective-C
@property (nonatomic, readonly) PSPDFToolbarButton *_Nonnull selectAllPagesButton;
Swift
var selectAllPagesButton: PSPDFToolbarButton { get }
-
Copies the selected pages to the pasteboard.
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFToolbarButton *_Nonnull copyPagesButton;
Swift
var copyPagesButton: PSPDFToolbarButton { get }
-
Copies the selected pages to the pasteboard, and then removes them from the document. (Cut)
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFToolbarButton *_Nonnull cutPagesButton;
Swift
var cutPagesButton: PSPDFToolbarButton { get }
-
Pastes the selected pages from the pasteboard.
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFToolbarButton *_Nonnull pastePagesButton;
Swift
var pastePagesButton: PSPDFToolbarButton { get }
-
Preset button for undoing the last change.
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFToolbarButton *_Nonnull undoButton;
Swift
var undoButton: PSPDFToolbarButton { get }
-
Preset button for redoing the last undo action.
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFToolbarButton *_Nonnull redoButton;
Swift
var redoButton: PSPDFToolbarButton { get }
-
Preset button for dismissing or showing the save UI if changes were made.
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFToolbarButton *_Nonnull doneButton;
Swift
var doneButton: PSPDFToolbarButton { get }
-
Toggles between the select all and select none state for
selectAllPagesButton
.Declaration
Objective-C
@property (nonatomic) BOOL allPagesSelected;
Swift
var allPagesSelected: Bool { get set }
-
Subclassing hook that allows customization of the visible buttons for the given toolbar length.
Call
super
and modify the returned array or construct your own toolbar using the preset buttons.Note
This will get called a lot (to size the toolbar, anchor views, etc.). You should cache the returned buttons or use preset buttons defined on PSPDFDocumentEditorToolbar.@property width The maximum available length (in either vertical or horizontal direction) for buttons given the container size. This excludes any button spacing.
Declaration
Objective-C
- (nonnull NSArray<__kindof PSPDFToolbarButton *> *)buttonsForWidth: (CGFloat)width;
Swift
func buttons(forWidth width: CGFloat) -> [PSPDFToolbarButton]
Return Value
The buttons that should be displayed.