Protocol

UITextInputDelegate

An intermediary between a document and the text input system.

Overview

A UITextInputDelegate conveys notifications of pending or transpired changes in text and selection in the document. UIKit provides a private text input delegate, which it assigns at runtime to the inputDelegate property of the object whose class adopts the UITextInput protocol.

Topics

Notifying the Delegate of Textual Changes

func textWillChange(UITextInput?)

Tells the input delegate when text is about to change in the document.

Required.

func textDidChange(UITextInput?)

Tells the input delegate when text has changed in the document.

Required.

Notifying the Delegate of Selection Changes

func selectionWillChange(UITextInput?)

Tells the input delegate when the selection is about to change in the document.

Required.

func selectionDidChange(UITextInput?)

Tells the input delegate when the selection has changed in the document.

Required.

Relationships

Inherits From

See Also

Input

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 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.