Instance Method

setMarkedText:selectedRange:

Insert the provided text and marks it to indicate that it is part of an active input session.

Required.

Declaration

- (void)setMarkedText:(NSString *)markedText selectedRange:(NSRange)selectedRange;

Parameters

markedText

The text to be marked.

selectedRange

A range within markedText that indicates the current selection. This range is always relative to markedText.

Discussion

Setting marked text either replaces the existing marked text or, if none is present, inserts it in place of the current selection.

See Also

Working with Marked and Selected Text

selectedTextRange

The range of selected text in a document.

Required.

markedTextRange

The range of text that is currently marked in a document.

Required.

markedTextStyle

A dictionary of attributes that describes how marked text should be drawn.

Required.

- unmarkText

Unmark the currently marked text.

Required.

selectionAffinity

The desired location for the insertion point.