Some test text!
iOS / Guides / Disable create/edit
The long-press popup menu and PTAnnotationToolbar show a default set of annotation creation tools. Editing of existing annotations is enabled for all annotation types by default. Other actions that are not tied to annotation creation, like text selection, form filling, and link following, are enabled by default.
Annotation creation and editing can be disabled on the PTToolManager using the PTAnnotationOptions property for a particular annotation type, such as
textAnnotationOptions
// Disable text highlight annotation creation and editing.
self.toolManager.highlightAnnotationOptions.canCreate = false
self.toolManager.highlightAnnotationOptions.canEdit = falseIt is also possible to disable annotation creation and editing based on the
PTExtendedAnnotType
enum by accessing the PTAnnotationOptions for that type using the
annotationOptionsForAnnotType:
method.
// Disable text highlight annotation creation and editing.
toolManager.annotationOptions(for: .highlight)?.canCreate = false
toolManager.annotationOptions(for: .highlight)?.canEdit = falseThe
PTExtendedAnnotType
enum extends the basic PTAnnotType to further distinguish annotations based on their properties (line and
arrow, polygon and cloudy, etc.). The extendedAnnotType property can be used to get the type of a PTAnnot.
Functionality that is not directly tied to annotations,like text selection, form filling, link following, and
ink erasing, can be disabled on the PTToolManager via
convenience properties:
// Disable link following.
self.toolManager.isLinkFollowingEnabled = falseThe code above disables link following for
link annotations
and text links detected by the
PTPDFViewCtrl
(the
setUrlExtraction:
method must be called on the PDFViewCtrl to enable text link detection).
Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales