Contents

locationForCharacter(at:)

Returns the location of the character at the specified index.

Declaration

func locationForCharacter(at index: Int) -> CGPoint

Parameters

  • index:

    An integer that represents the position in the text.

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