Performs hit testing.
- iOS 3.2+
- macOS 10.5+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
- Core Text
The line being examined.
The location of the mouse click relative to the line's origin.
The string index for the position, or if the line does not support string access,
k. Relative to the line's string range, this value can be no less than the first string index and no greater than the last string index plus 1.
This function can be used to determine the string index for a mouse click or other event. This string index corresponds to the character before which the next character should be inserted. This determination is made by analyzing the string from which a typesetter was created and the corresponding glyphs as embodied by a particular line.