<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VisionKit",
  "identifier" : "/documentation/VisionKit/ImageAnalysisInteraction/InteractionTypes/textSelection",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "VisionKit"
    ],
    "preciseIdentifier" : "s:9VisionKit24ImageAnalysisInteractionC0E5TypesV13textSelectionAEvpZ"
  },
  "title" : "textSelection"
}
-->

# textSelection

An option that enables text selection, copying, and translating.

```
static let textSelection: ImageAnalysisInteraction.InteractionTypes
```

## Discussion

People can select text to perform actions. In this mode, the framework disables data detectors ([`dataDetectors`](/documentation/VisionKit/ImageAnalysisInteraction/InteractionTypes/dataDetectors)) by default. However, if you set the
[`allowLongPressForDataDetectorsInTextMode`](/documentation/VisionKit/ImageAnalysisInteraction/allowLongPressForDataDetectorsInTextMode)
property to `true`, a person can use a long-press gesture to enable them.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)