Instance Property

editing

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

Declaration

@property(nonatomic, readonly, getter=isEditing) BOOL editing;

Discussion

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

See Also

Managing the Editing Behavior

clearsOnBeginEditing

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

clearsOnInsertion

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

allowsEditingTextAttributes

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

UITextFieldDidEndEditingReason

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

UITextFieldTextDidBeginEditingNotification

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.

UITextFieldTextDidChangeNotification

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

UITextFieldTextDidEndEditingNotification

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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software