<!--
{
  "availability" : [
    "macOS: 13.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VisionKit",
  "identifier" : "/documentation/VisionKit/ImageAnalysisOverlayView/hasActiveTextSelection",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "VisionKit"
    ],
    "preciseIdentifier" : "s:9VisionKit24ImageAnalysisOverlayViewC22hasActiveTextSelectionSbvp"
  },
  "title" : "hasActiveTextSelection"
}
-->

# hasActiveTextSelection

A Boolean value that indicates whether a person or the app has text selected within the image.

```
@MainActor final var hasActiveTextSelection: Bool { get }
```

## Discussion

If [`textSelection`](/documentation/VisionKit/ImageAnalysisOverlayView/InteractionTypes/textSelection) is an active
interaction type, a person can select text using a standard input method and the app can select text through the [`selectedRanges`](/documentation/VisionKit/ImageAnalysisOverlayView/selectedRanges) property.
If neither a person nor the app select any text, then this property returns `false`.

---

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)