---
title: "locationForCharacter(at:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nstextlinefragment/locationforcharacter(at:)"
---

# locationForCharacter(at:)

Returns the location of the character at the specified index.

## Declaration

```swift
func locationForCharacter(at index: Int) -> CGPoint
```

## Parameters

- `index`: An integer that represents the position in the text.

## Return Value

Return Value A CGPoint that’s on the upstream edge of the glyph. It’s in the coordinate system relative to the line fragment origin.

## See Also

### Finding specific text

- [characterIndex(for:)](uikit/nstextlinefragment/characterindex(for:).md)
- [fractionOfDistanceThroughGlyph(for:)](uikit/nstextlinefragment/fractionofdistancethroughglyph(for:).md)
