Customize annotation style presets on iOS
Overview
Annotation tools come with a set of four presets, accessible from the presets section:

Annotation tools can also be invoked via a long-press.
These presets are "sticky" in that changes made by the user to each preset will persist between runs of your app.
This guide explains how to customize the initial values of the presets.
Customizing Presets
Presets are customized using a custom plist (property list) that must be called PTAnnotationStyleDefaults.plist file included in your app's bundle. This can be done by including the file in your Xcode project and ensuring that it is copied into the app bundle as shown:

The plist contains an array of dictionaries. Each dictionary has two entries, one with the key types and the other with the key presets.
The value of the types entry is an array of strings, where each string value is the name of the annotation type for which the associated presets apply.
The value of the presets entry is an array of exactly four dictionaries, where each dictionary represents one preset. The dictionaries contain key/value pairs, where the key is the annotation property, and the value is its initial value.
This is an example .plist file, shown in Xcode's plist editor, and written as xml. A list of all possible keys follows the example. You can also download the example plist file.

presets key
value
property
color
hex-formatted RRGGBB string, e.g. #ff0000
The color or stroke color of the annotation.
fillColor
hex-formatted RRGGBB string, e.g. #00ff00
The fill color of the annotation.
thickness
number, e.g. 2
The thickness, in pixels, of an annotation's stroke.
opacity
number between 0 and 1, e.g. 0.5
The opacity of an annotation.
types array (case sensitive)
Text
Link
FreeText
Line
Square
Circle
Polygon
Polyline
Highlight
Underline
Squiggly
StrikeOut
Stamp
Caret
Ink
Popup
FileAttachment
Sound
Movie
Widget
Screen
PrinterMark
TrapNet
Watermark
ThreeDimensional
Redact
Projection
RichMedia
Arrow
Signature
Cloudy
Ruler
Perimeter
Area
ImageStamp
PencilDrawing
FreehandHighlight
Callout
Last updated
Was this helpful?