iOS Developer Library

Developer

UIKit Framework Reference UITextInputDelegate Protocol Reference

Options
Deployment Target:

On This Page
Language:

UITextInputDelegate

The text input delegate acts as an intermediary between a document and the text input system, conveying notifications of pending or transpired changes in text and selection in the document. More...

Inheritance


Not Applicable

Import Statement


import UIKit @import UIKit;

Availability


Available in iOS 3.2 and later.
  • Tells the input delegate when text is about to change in the document. (required)

    Declaration

    Swift

    func textWillChange(_ textInput: UITextInput)

    Objective-C

    - (void)textWillChange:(id<UITextInput>)textInput

    Parameters

    textInput

    The document instance whose class adopts the UITextInput protocol.

    Import Statement

    import UIKit

    Availability

    Available in iOS 3.2 and later.

  • Tells the input delegate when text has changed in the document. (required)

    Declaration

    Swift

    func textDidChange(_ textInput: UITextInput)

    Objective-C

    - (void)textDidChange:(id<UITextInput>)textInput

    Parameters

    textInput

    The document instance whose class adopts the UITextInput protocol.

    Import Statement

    import UIKit

    Availability

    Available in iOS 3.2 and later.

  • Tells the input delegate when the selection is about to change in the document. (required)

    Declaration

    Swift

    func selectionWillChange(_ textInput: UITextInput)

    Objective-C

    - (void)selectionWillChange:(id<UITextInput>)textInput

    Parameters

    textInput

    The document instance whose class adopts the UITextInput protocol.

    Import Statement

    import UIKit

    Availability

    Available in iOS 3.2 and later.

  • Tells the input delegate when the selection has changed in the document. (required)

    Declaration

    Swift

    func selectionDidChange(_ textInput: UITextInput)

    Objective-C

    - (void)selectionDidChange:(id<UITextInput>)textInput

    Parameters

    textInput

    The document instance whose class adopts the UITextInput protocol.

    Import Statement

    import UIKit

    Availability

    Available in iOS 3.2 and later.