Protocol: UITextInputTokenizer
Overview
An instance of a class that adopts the UITextInputTokenizer protocol is a tokenizer; a tokenizer allows the text input system to evaluate text units of different granularities. Granularities of text units are always evaluated with reference to a storage or reference direction.Return whether a text position is at a boundary of a text unit of a specified granularity in a specified direction. (required)Return whether a text position is within a text unit of a specified granularity in a specified direction. (required)Return the next text position at a boundary of a text unit of the given granularity in a given direction. (required)Return the range for the text enclosing a text position in a text unit of a given granularity in a given direction. (required)A direction of the text.The granularity of a unit of text.
Instance Method Summary (collapse)
-
- isPosition:atBoundary:inDirection:
Return whether a text position is at a boundary of a text unit of a specified granularity in a specified direction.
-
- isPosition:withinTextUnit:inDirection:
Return whether a text position is within a text unit of a specified granularity in a specified direction.
-
- positionFromPosition:toBoundary:inDirection:
Return the next text position at a boundary of a text unit of the given granularity in a given direction.
-
- rangeEnclosingPosition:withGranularity:inDirection:
Return the range for the text enclosing a text position in a text unit of a given granularity in a given direction.
Instance Method Details
- (Boolean) isPosition(position, atBoundary:granularity, inDirection:direction)
Return whether a text position is at a boundary of a text unit of a specified granularity in a specified direction. (required)
- (Boolean) isPosition(position, withinTextUnit:granularity, inDirection:direction)
Return whether a text position is within a text unit of a specified granularity in a specified direction. (required)
- (UITextPosition) positionFromPosition(position, toBoundary:granularity, inDirection:direction)
Return the next text position at a boundary of a text unit of the given granularity in a given direction. (required)
- (UITextRange) rangeEnclosingPosition(position, withGranularity:granularity, inDirection:direction)
Return the range for the text enclosing a text position in a text unit of a given granularity in a given direction. (required) In this method, return the range for the text enclosing a text position in a text unit of the given granularity, or nil if there is no such enclosing unit. If the text position is entirely enclosed within a text unit of the given granularity, it is considered enclosed. If the text position is at a text-unit boundary, it is considered enclosed only if the next position in the given direction is entirely enclosed.