UITextInputMode Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/UIKit.framework
Availability
Available in iOS 4.2 and later.
Declared in
UITextInput.h

Overview

An instance of the UITextInputMode class represents the current text-input mode. You can use this object to determine the primary language currently being used for text input.

Tasks

Getting the Current and Active Text-Input Modes

Getting the Primary Language

Properties

primaryLanguage

The primary language, if any, of the input mode.

@property (nonatomic, readonly, retain) NSString *primaryLanguage
Discussion

The value of this property is a BCP 47 language code such as “es”, “en-US”, or “fr-CA”.

Availability
  • Available in iOS 4.2 and later.
Declared In
UITextInput.h

Class Methods

activeInputModes

Returns the active text-input modes.

+ (NSArray *)activeInputModes
Discussion

Each element in the array is an instance of UITextInputMode. Returns an empty array if no such instances have been set by the text input system.

Availability
  • Available in iOS 5.0 and later.
Declared In
UITextInput.h

Notifications

UITextInputCurrentInputModeDidChangeNotification

Posted when the current input mode changes.

The posting object is a UITextInputMode instance.

Availability
Declared In
UITextInput.h