PTToolGroupToolbar


@interface PTToolGroupToolbar
    : UIView <PTAnnotStyleViewControllerDelegate, UIToolbarDelegate>

The PTToolGroupToolbar displays a list of buttons that allow the user to switch between tools in a PTToolManager instance. The set of tool buttons displayed by this control can be selected from a list of “Annotation Modes”, each of which have different tools available for different tasks (drawing, measuring, etc.). The tool groups are controlled by a PTToolGroupManager instance used by the toolbar.

The tool buttons in the toolbar are represented by UIBarButtonItem instances. The list of buttons for the current tool group are displayed in a scrollable area of the toolbar.

In addition to the tool buttons displayed in the center of the toolbar, other buttons can be shown pinned at the leading and trailing ends of the toolbar. By default the PTToolGroupManager.undoButtonItem and PTToolGroupManager.redoButtonItem buttons are shown at the trailing end of the toolbar.

  • Initializes a newly created PTToolGroupToolbar instance with the provided tool group manager.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithToolGroupManager:
        (nonnull PTToolGroupManager *)toolGroupManager;

    Swift

    init(toolGroupManager: PTToolGroupManager)

    Parameters

    toolGroupManager

    The tool group manager to be used by the receiver

    Return Value

    an initialized PTToolGroupToolbar instance

  • The delegate object of the tool group toolbar.

    Declaration

    Objective-C

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

    Swift

    weak var delegate: PTToolGroupToolbarDelegate? { get set }
  • The tool group manager instance used to control the current tool group and the set of bar button items displayed in this tool group toolbar.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable)
        PTToolGroupManager *toolGroupManager;

    Swift

    var toolGroupManager: PTToolGroupManager? { get set }
  • The bar button items displayed in the scrollable area of the toolbar.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable)
        NSArray<UIBarButtonItem *> *items;

    Swift

    var items: [UIBarButtonItem]? { get set }
  • The bar button items displayed at the leading end of the toolbar.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable)
        NSArray<UIBarButtonItem *> *leadingItems;

    Swift

    var leadingItems: [UIBarButtonItem]? { get set }
  • The bar button items displayed at the trailing end of the toolbar.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable)
        NSArray<UIBarButtonItem *> *trailingItems;

    Swift

    var trailingItems: [UIBarButtonItem]? { get set }
  • The tint color to apply to the items.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) UIColor *itemTintColor;

    Swift

    var itemTintColor: UIColor? { get set }
  • The annotation style presets toolbar displayed when a tool is active in a horizontally compact environment.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic)
        PTAnnotStyleToolbar *_Nonnull presetsToolbar;

    Swift

    var presetsToolbar: PTAnnotStyleToolbar { get }
  • Whether the presetsToolbar is enabled and will be shown when necessary.

    The default value of this property is YES.

    Declaration

    Objective-C

    @property (getter=isPresetsToolbarEnabled, assign, readwrite, nonatomic)
        BOOL presetsToolbarEnabled;

    Swift

    var isPresetsToolbarEnabled: Bool { get set }
  • Whether the presetsToolbar is hidden.

    The default value of this property is YES.

    Declaration

    Objective-C

    @property (getter=isPresetsToolbarHidden, assign, readwrite, nonatomic)
        BOOL presetsToolbarHidden;

    Swift

    var isPresetsToolbarHidden: Bool { get set }
  • Sets whether the presetsToolbar is hidden.

    Declaration

    Objective-C

    - (void)setPresetsToolbarHidden:(BOOL)hidden animated:(BOOL)animated;

    Swift

    func setPresetsToolbarHidden(_ hidden: Bool, animated: Bool)

    Parameters

    hidden

    Specify YES to hide the presets toolbar or NO to show it.

    animated

    Specify YES if you want to animate the change in visibility or NO if you want the control to appear immediately.

  • The annotation style presets view displayed when a tool is active in a horizontally regular environment.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic)
        PTAnnotationStylePresetsView *_Nonnull presetsView;

    Swift

    var presetsView: PTAnnotationStylePresetsView { get set }
  • Whether the presetsView is hidden.

    The default value of this property is YES.

    Declaration

    Objective-C

    @property (getter=isPresetsViewHidden, assign, readwrite, nonatomic)
        BOOL presetsViewHidden;

    Swift

    var isPresetsViewHidden: Bool { get set }
  • Sets whether the presetsView is hidden.

    Declaration

    Objective-C

    - (void)setPresetsViewHidden:(BOOL)hidden animated:(BOOL)animated;

    Swift

    func setPresetsViewHidden(_ hidden: Bool, animated: Bool)

    Parameters

    hidden

    Specify YES to hide the presets view or NO to show it.

    animated

    Specify YES if you want to animate the change in visibility or NO if you want the control to appear immediately.

  • The annotation style view controller used by to edit annotation style presets.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable)
        PTAnnotStyleViewController *stylePicker;

    Swift

    weak var stylePicker: PTAnnotStyleViewController? { get set }
  • Whether the edit view shown for multi-action annotation creation tools (polyline, polygon, etc.) is hidden.

    The default value of this property is YES.

    Declaration

    Objective-C

    @property (getter=isEditViewHidden, assign, readwrite, nonatomic)
        BOOL editViewHidden;

    Swift

    var isEditViewHidden: Bool { get set }
  • Sets whether the edit view is hidden.

    Declaration

    Objective-C

    - (void)setEditViewHidden:(BOOL)hidden animated:(BOOL)animated;

    Swift

    func setEditViewHidden(_ hidden: Bool, animated: Bool)

    Parameters

    hidden

    Specify YES to hide the edit view or NO to show it.

    animated

    Specify YES if you want to animate the change in visibility or NO if you want the control to appear immediately.