Enumeration

UITextField.ViewMode

Defines the times at which overlay views appear in a text field.

Declaration

enum ViewMode : Int

Topics

Constants

case never

The overlay view never appears.

case whileEditing

The overlay view is displayed only while text is being edited in the text field.

case unlessEditing

The overlay view is displayed only when text is not being edited.

case always

The overlay view is always displayed if the text field contains text.

See Also

Managing Overlay Views

var clearButtonMode: UITextField.ViewMode

Controls when the standard clear button appears in the text field.

var leftView: UIView?

The overlay view displayed on the left (or leading) side of the text field.

var leftViewMode: UITextField.ViewMode

Controls when the left overlay view appears in the text field.

var rightView: UIView?

The overlay view displayed on the right (or trailing) side of the text field.

var rightViewMode: UITextField.ViewMode

Controls when the right overlay view appears in the text field.