Instance Method

selectedRange

Returns the range of selected text.

Required.

Declaration

- (NSRange)selectedRange;

Return Value

The range of selected text.

Discussion

The returned range measures from the start of the receiver’s text storage. If there is no selection, the return value’s location is NSNotFound, and its length is 0.

See Also

Marked text

- hasMarkedText

Returns a Boolean value indicating whether or not the receiver has marked text.

Required.

Deprecated
- markedRange

Returns the range of the marked text.

Required.

Deprecated
- setMarkedText:selectedRange:

Replaces currently marked text in the receiver’s text storage with the given string and sets the selection to the given range, computed from the beginning of the marked text.

Required.

Deprecated
- unmarkText

Removes any marking from pending input text and disposes of the marked text as it wishes. The text view should accept the marked text as if it had been inserted normally.

Required.

Deprecated
- validAttributesForMarkedText

Returns an array of names for the attributes supported by the receiver.

Required.

Deprecated