Contents

NSTextAlternatives

A list of alternative strings for a piece of text.

Declaration

class NSTextAlternatives

Overview

NSTextAlternatives is an immutable value class that stores a list of alternatives for a piece of text and communicates the user’s selection of an alternative via a notification to your app. To support dictation, for example, you might use NSTextAlternatives to present a list of alternative interpretations for a word or phrase the user speaks. If the user chooses to replace the initial interpretation with an alternative, NSTextAlternatives notifies you of the choice so that you can update the text appropriately.

NSTextAlternatives instances are attached to attributed strings as the value of a text attribute, NSTextAlternativesAttributeName.

Topics

Initializing a Text Alternatives Object

Storing Alternative Text Strings

Selecting an Alternative String

Notifications

Initializers

See Also

Text input