Instance Property

clearsOnInsertion

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

Declaration

@property(nonatomic) BOOL clearsOnInsertion;

Discussion

The default value of this property is NO. When the value of this property is YES and the text field is in editing mode, the selection UI is hidden and inserting new text clears the contents of the text field and sets the value of this property back to NO.

See Also

Managing the Editing Behavior

editing

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

clearsOnBeginEditing

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

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.