A set of methods a subclass of UIResponder uses to implement simple text entry.


protocol UIKeyInput


When instances of this subclass are the first responder, the system keyboard is displayed. Only a small subset of the available keyboards and languages are available to classes that adopt this protocol.


Inserting and Deleting Text

func insertText(String)

Insert a character into the displayed text.


func deleteBackward()

Delete a character from the displayed text.


var hasText: Bool

A Boolean value that indicates whether the text-entry objects has any text.



Inherits From

See Also


protocol UITextInput

A set of methods you implement to interact with the text input system and enable features such as autocorrection and multistage text input in documents.

protocol UITextInputDelegate

An intermediary between a document and the text input system.

protocol UITextInputTokenizer

A tokenizer, which is an object that allows the text input system to evaluate text units of different granularities.

class UITextInputMode

The current text-input mode.

class UITextInputStringTokenizer

A base implementation of the UITextInputTokenizer protocol.

class UIDictationPhrase

An object that represents the textual interpretation of a spoken phrase as dictated by a user.

class UIInputView

An object that displays and manages custom input for a view when that view becomes the first responder.