Instance Property

textContentType

The semantic meaning expected by a text input area.

Declaration

optional var textContentType: UITextContentType! { get set }

Discussion

Use this property to give the keyboard and the system information about the expected semantic meaning for the content that users enter. For example, you might specify emailAddress for a text field that users fill in to receive an email confirmation. When you provide this information about the content you expect users to enter in a text input area, the system can in some cases automatically select an appropriate keyboard and improve keyboard corrections and proactive integration with other text input opportunities.

Because the expected semantic meaning for each text input area should be identified as specifically as possible, you can’t combine multiple values for one textContentType property. For possible values you can use, see Text Content Types; by default, the value of this property is nil.

See Also

Configuring the Keyboard Appearance

var keyboardType: UIKeyboardType

The keyboard style associated with the text object.

enum UIKeyboardType

The type of keyboard to display for a given text-based view. Used with the keyboardType property.

var keyboardAppearance: UIKeyboardAppearance

The appearance style of the keyboard that is associated with the text object

enum UIKeyboardAppearance

The appearance of the keyboard used by a text-based view. Used with the keyboardAppearance property.

var returnKeyType: UIReturnKeyType

The visible title of the Return key.

enum UIReturnKeyType

The text string displayed in the Return key of a keyboard. Used with the returnKeyType property.

struct UITextContentType

Constants that identify the semantic meaning expected for a text-entry area.