PTEditToolbar


@interface PTEditToolbar : UIToolbar <PTOverridable>

The PTEditToolbar is used while creating certain annotation types and provides buttons for saving or discarding changes, as well as an optional undo/redo interface.

  • Initializes an edit toolbar with a tool manager.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithToolManager:
        (nonnull PTToolManager *)toolManager;

    Swift

    init(toolManager: PTToolManager)

    Parameters

    toolManager

    the tool manager used by the edit toolbar

  • The tool manager used by the edit toolbar to track the current tool and its undo/redo state.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) PTToolManager *toolManager;

    Swift

    var toolManager: PTToolManager? { get set }
  • The edit toolbar’s delegate object.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<PTEditToolbarDelegate> delegate;

    Swift

    weak var delegate: (any PTEditToolbarDelegate)? { get set }
  • Whether the undo/redo buttons are hidden. The default is NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL undoRedoHidden;

    Swift

    var undoRedoHidden: Bool { get set }
  • Whether the style edit button is hidden. The default is NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL styleButtonHidden;

    Swift

    var styleButtonHidden: Bool { get set }
  • Whether the undo button is enabled. The default is NO.

    Declaration

    Objective-C

    @property (nonatomic, getter=isUndoEnabled) BOOL undoEnabled;

    Swift

    var isUndoEnabled: Bool { get set }
  • Whether the redo button is enabled. The default is NO.

    Declaration

    Objective-C

    @property (nonatomic, getter=isRedoEnabled) BOOL redoEnabled;

    Swift

    var isRedoEnabled: Bool { get set }