Instance Method


Returns the baseline position of a given character relative to the origin of rectangle returned by firstRectForCharacterRange:actualRange:.


- (CGFloat)baselineDeltaForCharacterAtIndex:(NSUInteger)anIndex;



Index of the character whose baseline is tested.

Return Value

The vertical distance, in points, between the baseline of the character at anIndex and the rectangle origin.


Implementation of this method is optional. This information allows the caller to determine finer-grained character positioning within the text storage of the text view adopting NSTextInputClient.

See Also

Optional Methods

- attributedString

Returns an attributed string representing the receiver's text storage.

- fractionOfDistanceThroughGlyphForPoint:

Returns the fraction of the distance from the left side of the character to the right side that a given point lies.

- windowLevel

Returns the window level of the receiver.

- drawsVerticallyForCharacterAtIndex:

Informs the text input management system whether the protocol-conforming client renders the character at the given index vertically.