Instance Property

leftViewMode

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

Declaration

var leftViewMode: UITextField.ViewMode { get set }

Discussion

The default value for this property is UITextField.ViewMode.never. Note that the left overlay view flips automatically in a right-to-left user interface.

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 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.

enum UITextField.ViewMode

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

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