> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/ios/annotation/disabling-tools.md).

# Disable annotation creation and editing in iOS viewer

Learn how to disable annotation creation and editing tools in your PDFTron SDK with this comprehensive guide. Customize your annotation options easily. The Apryse iOS SDK streamlines secure document p

The long-press popup menu and [`PTAnnotationToolbar`](/ios/annotation/annotation-toolbar-i.md) 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.

## Disable annotation tools

Annotation creation and editing can be disabled on the `PTToolManager` using the `PTAnnotationOptions` property for a particular annotation type, such as [`textAnnotationOptions`](https://sdk.apryse.com/api/ios/Classes/PTToolManager.html#/c:objc\(cs\)PTToolManager\(py\)textAnnotationOptions)

{% tabs %}
{% tab title="Swift" %}
{% code lineNumbers="true" %}

```swift
// Disable text highlight annotation creation and editing.
self.toolManager.highlightAnnotationOptions.canCreate = false
self.toolManager.highlightAnnotationOptions.canEdit = false
```

{% endcode %}
{% endtab %}

{% tab title="Obj-C" %}
{% code lineNumbers="true" %}

```objc
// Disable text highlight annotation creation and editing.
self.toolManager.highlightAnnotationOptions.canCreate = NO;
self.toolManager.highlightAnnotationOptions.canEdit = NO;
```

{% endcode %}
{% endtab %}
{% endtabs %}

It is also possible to disable annotation creation and editing based on the [`PTExtendedAnnotType`](https://sdk.apryse.com/api/ios/Enums/PTExtendedAnnotType.html) enum by accessing the `PTAnnotationOptions` for that type using the [`annotationOptionsForAnnotType:`](https://sdk.apryse.com/api/ios/Classes/PTToolManager.html#/c:objc\(cs\)PTToolManager\(im\)annotationOptionsForAnnotType:) method.

{% tabs %}
{% tab title="Swift" %}
{% code lineNumbers="true" %}

```swift
// Disable text highlight annotation creation and editing.
toolManager.annotationOptions(for: .highlight)?.canCreate = false
toolManager.annotationOptions(for: .highlight)?.canEdit = false
```

{% endcode %}
{% endtab %}

{% tab title="Obj-C" %}
{% code lineNumbers="true" %}

```objc
// Disable text highlight annotation creation and editing.
[self.toolManager annotationOptionsForAnnotType:PTExtendedAnnotTypeHighlight].canCreate = NO;
[self.toolManager annotationOptionsForAnnotType:PTExtendedAnnotTypeHighlight].canEdit = NO;
```

{% endcode %}
{% endtab %}
{% endtabs %}

The [`PTExtendedAnnotType`](https://sdk.apryse.com/api/ios/Enums/PTExtendedAnnotType.html) enum extends the basic `PTAnnotType` to further distinguish annotations based on their properties (line and arrow, polygon and cloudy, etc.). The [`extendedAnnotType`](https://sdk.apryse.com/api/ios/Classes/PTToolManager.html#/c:objc\(cs\)PTToolManager\(im\)annotationOptionsForAnnotType:) property can be used to get the type of a [`PTAnnot`](https://sdk.apryse.com/api/ios/Classes/PTAnnot.html).

## Disable functionality

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]\(<https://sdk.apryse.com/api/ios/Classes/PTToolManager.html#/Interaction> features):

{% tabs %}
{% tab title="Swift" %}
{% code lineNumbers="true" %}

```swift
// Disable link following.
self.toolManager.isLinkFollowingEnabled = false
```

{% endcode %}
{% endtab %}

{% tab title="Obj-C" %}
{% code lineNumbers="true" %}

```objc
// Disable link following.
self.toolManager.linkFollowingEnabled = NO;
```

{% endcode %}
{% endtab %}
{% endtabs %}

The code above disables link following for [link annotations](https://sdk.apryse.com/api/ios/Classes/PTLink.html) and text links detected by the `PTPDFViewCtrl` (the [`setUrlExtraction:`](https://sdk.apryse.com/api/ios/Classes/PTPDFViewCtrl.html#/c:objc\(cs\)PTPDFViewCtrl\(im\)SetUrlExtraction:) method must be called on the PDFViewCtrl to enable text link detection).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/ios/annotation/disabling-tools.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
