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

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, weak, readwrite, 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 (nonatomic, assign, unsafe_unretained, readwrite) BOOL undoRedoHidden;

    Swift

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

    Declaration

    Objective-C

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

    Swift

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

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite, 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, assign, unsafe_unretained, readwrite, getter=isRedoEnabled)
        BOOL redoEnabled;

    Swift

    var isRedoEnabled: Bool { get set }