selectedTextRange
A range that represents the selected text.
Declaration
@NSCopying var selectedTextRange: UITextRange? { get set }Mentioned in
Discussion
Text might have a selection with a zero length (just the caret) or a range. Editing operations always apply to the selection text. A nil value corresponds to no selection.