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.
  • 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.