Frameworks
React Native
Flutter
Version 10
Version 9
Version 8
Version 7
Version 6
Version 5
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.
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.
| value | property |
---|---|---|
| hex-formatted RRGGBB string, e.g. | The color or stroke color of the annotation. |
| hex-formatted RRGGBB string, e.g. | The fill color of the annotation. |
| hex-formatted RRGGBB string, e.g. | The color of the text of a PTFreeText annotation. |
| number, e.g. | The font size, in pts, of a PTFreeText annotation. |
| number, e.g. | The thickness, in pixels, of an annotation's stroke. |
| number between 0 and 1, e.g. | The opacity of an annotation. |
|
---|
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 |
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales