Protocol

UITextInputTraits

The UITextInputTraits protocol defines features associated with keyboard input to a text object.

Overview

For a custom text object to support keyboard input, it must adopt this protocol to interact properly with the text input management system. The UITextField and UITextView classes automatically support this protocol.

Symbols

Managing the Keyboard Behavior

var autocapitalizationType: UITextAutocapitalizationType

The auto-capitalization style for the text object.

var autocorrectionType: UITextAutocorrectionType

The autocorrection style for the text object.

var spellCheckingType: UITextSpellCheckingType

The spell-checking style for the text object.

var enablesReturnKeyAutomatically: Bool

A Boolean value indicating whether the Return key is automatically enabled when the user is entering text.

var keyboardAppearance: UIKeyboardAppearance

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

var keyboardType: UIKeyboardType

The keyboard style associated with the text object.

var returnKeyType: UIReturnKeyType

The visible title of the Return key.

var isSecureTextEntry: Bool

Identifies whether the text object should disable text copying and in some cases hide the text being entered.

var textContentType: UITextContentType!

Indicates the semantic meaning expected by a text-entry area.

Constants

UITextAutocapitalizationType

The auto-capitalization behavior of a text-based view. Used with the autocapitalizationType property.

UITextAutocorrectionType

The autocorrection behavior of a text-based view. Used with the autocorrectionType property.

UITextSpellCheckingType

The spell-checking behavior of a text-based view. Used with the spellCheckingType property.

UIKeyboardType

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

UIKeyboardAppearance

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

UIReturnKeyType

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

Text Content Types

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

Relationships

Inherits From

Adopted By