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 (readwrite, strong, nonatomic, nullable) PTToolManager *toolManager;

    Swift

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

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL undoRedoHidden;

    Swift

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

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL styleButtonHidden;

    Swift

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

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

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

    Swift

    var isRedoEnabled: Bool { get set }