<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BrowserEngineKit",
  "identifier" : "/documentation/BrowserEngineKit/BETextInput/selectText(in:at:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "BrowserEngineKit"
    ],
    "preciseIdentifier" : "c:objc(pl)BETextInput(im)selectTextInGranularity:atPoint:completionHandler:"
  },
  "title" : "selectText(in:at:completionHandler:)"
}
-->

# selectText(in:at:completionHandler:)

Selects the text within the given granularity at the given point in the text view.

```
func selectText(in granularity: UITextGranularity, at point: CGPoint, completionHandler: @escaping @Sendable () -> Void)
```

```
func selectText(in granularity: UITextGranularity, at point: CGPoint) async
```

## Parameters

`granularity`

The amount of text to select.

`point`

The location of the selection in the text view.

`completionHandler`

A block you call after your text view handles the gesture.

---

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)