Instance Property

isEditing

A Boolean value indicating whether the text field is currently in edit mode.

Declaration

var isEditing: Bool { get }

Discussion

This property is set to true when the user begins editing text in this text field, and it is set to false again when editing ends. The text field notifies its delegate when editing begins and ends.

See Also

Managing the Editing Behavior

var clearsOnBeginEditing: Bool

A Boolean value indicating whether the text field removes old text when editing begins.

var clearsOnInsertion: Bool

A Boolean value indicating whether inserting text replaces the previous contents.

var allowsEditingTextAttributes: Bool

A Boolean value indicating whether the user may edit the attributes of the text in the text field.

enum UITextField.DidEndEditingReason

Constants indicating the reason why editing ended in a text field.

class let textDidBeginEditingNotification: NSNotification.Name

Notifies observers that an editing session began in a text field. The affected text field is stored in the object parameter of the notification. The userInfo dictionary is not used.

class let textDidChangeNotification: NSNotification.Name

Notifies observers that the text in a text field changed. The affected text field is stored in the object parameter of the notification.

class let textDidEndEditingNotification: NSNotification.Name

Notifies observers that the editing session ended for a text field. The affected text field is stored in the object parameter of the notification. The userInfo dictionary is not used.