---
title: "characterRange(at:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitextinput/characterrange(at:)"
---

# characterRange(at:)

Returns the character or range of characters that is at a specified point in a document.

## Declaration

```swift
func characterRange(at point: CGPoint) -> UITextRange?
```

## Parameters

- `point`: A point in the view that is drawing a document’s text.

## Return Value

Return Value An object representing a range that encloses a character (or characters) at point.

## See Also

### Working with geometry and hit-testing

- [firstRect(for:)](uikit/uitextinput/firstrect(for:).md)
- [closestPosition(to:)](uikit/uitextinput/closestposition(to:).md)
- [selectionRects(for:)](uikit/uitextinput/selectionrects(for:).md)
- [closestPosition(to:within:)](uikit/uitextinput/closestposition(to:within:).md)
