Annotation toolbar

The AnnotationToolbar class is a UIToolbar consisting of various annotation creation tools. With the annotation toolbar, users are able to conveniently create and switch between different tools.

The annotation toolbar control is part of the Tools library, so make sure you have added it to your project.

Due to space limitations, only a limited number of tools will show up in portrait mode on smaller devices.
ScenarioAnnotation Toolbar
Small devices in landscape mode + Tablet devices
Small devices in portrait mode

Showing/hiding the annotation toolbar

To create and set up an annotation toolbar, initialize an AnnotationToolbar instance and add it to your view hierarchy:

Then, you need to attach a ToolManager to the annotation toolbar so that the toolbar can change tools:

Annotation toolbar delegate

The AnnotationToolbarDelegate protocol allows the adopting class (usually the containing view controller, as in this guide) to be notified of annotation toolbar events and control the behavior of the toolbar. Since this protocol also conforms to the UIToolbarDelegate protocol, the annotation toolbar's delegate can implement the positionForBar: method to indicate the toolbar position:

Continuous annotation editing

By default, the annotation toolbar returns to the pan tool after an annotation is created. If you prefer to stay in the same tool mode after an annotation is created, you should implement the toolShouldGoBackToPan method in your AnnotationToolbarDelegate adopting class:

The annotation toolbar's behavior could also be handled within user settings by checking and returning the appropriate settings value in the method above.