Instance Method

setBaseWritingDirection(_:for:)

Set the base writing direction for a given range of text in a document.

Required.

Declaration

func setBaseWritingDirection(_ writingDirection: NSWritingDirection, for range: UITextRange)

Parameters

writingDirection

A constant that represents a writing direction (for example, left-to-right or right-to-left)

range

An object that represents a range of text in a document.

See Also

Determining Layout and Writing Direction

func position(within: UITextRange, farthestIn: UITextLayoutDirection) -> UITextPosition?

Return the text position that is at the farthest extent in a given layout direction within a range of text.

Required.

func characterRange(byExtending: UITextPosition, in: UITextLayoutDirection) -> UITextRange?

Return a text range from a given text position to its farthest extent in a certain direction of layout.

Required.

func baseWritingDirection(for: UITextPosition, in: UITextStorageDirection) -> NSWritingDirection

Return the base writing direction for a position in the text going in a certain direction.

Required.