<!--
{
  "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/allowLongPressForDataDetectorsInTextMode",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "VisionKit"
    ],
    "preciseIdentifier" : "s:9VisionKit24ImageAnalysisInteractionC40allowLongPressForDataDetectorsInTextModeSbvp"
  },
  "title" : "allowLongPressForDataDetectorsInTextMode"
}
-->

# allowLongPressForDataDetectorsInTextMode

A Boolean value that indicates whether people can press and hold text to
activate data detectors.

```
@MainActor final var allowLongPressForDataDetectorsInTextMode: Bool { get set }
```

## Discussion

If you set this property to
`true` when the
interaction type is just text, people can press and hold data in text,
even when data detectors aren’t active. Otherwise, people can perform
only text actions, such as copy and translate. The default value for
this property is
`true`.

---

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)