position(within:farthestIn:)
Returns the text position that is at the farthest extent in a specified layout direction within a range of text.
Declaration
func position(within range: UITextRange, farthestIn direction: UITextLayoutDirection) -> UITextPosition?Parameters
- range:
A text-range object that demarcates a range of text in a document.
- direction:
A constant that indicates a direction of layout (right, left, up, down).
Return Value
A text-position object that identifies a location in the visible text.