iOS Developer Library

Developer

UIKit Framework Reference UIDictationPhrase Class Reference

Options
Deployment Target:

On This Page
Language:

UIDictationPhrase

Inherits From


Conforms To


Import Statement


Swift

import UIKit

Objective-C

@import UIKit;

Availability


Available in iOS 5.1 and later

A dictation phrase object represents the textual interpretation of a spoken phrase as dictated by a user.

Starting in iOS 5.1, when the user chooses dictation input on a supported device, the system automatically inserts recognized phrases into the current text view. You can use an object of the UIDictationPhrase class to obtain a string representing a phrase a user has dictated. In the case of ambiguous dictation results, a dictation phrase object provides an array containing alternative strings. Methods in the UITextInput protocol allow your app to respond to the completion of dictation.

  • An array of alternative textual interpretations of a dictated phrase. (read-only)

    Declaration

    Swift

    var alternativeInterpretations: [AnyObject]? { get }

    Objective-C

    @property(nonatomic, readonly) NSArray *alternativeInterpretations

    Discussion

    If the system determines only one textual interpretation of a dictated phrase, the value of this property is nil. If there is more than one interpretation, this property contains an array of strings, with the first being most likely interpretation and the last being the least likely.

    Import Statement

    Objective-C

    @import UIKit;

    Swift

    import UIKit

    Availability

    Available in iOS 5.1 and later

  • text text Property

    The most likely textual interpretation of a dictated phrase. (read-only)

    Declaration

    Swift

    var text: String! { get }

    Objective-C

    @property(nonatomic, readonly) NSString *text

    Import Statement

    Objective-C

    @import UIKit;

    Swift

    import UIKit

    Availability

    Available in iOS 5.1 and later