Extends Item

Apple.TextField

A iOS styled text input field.

property String text

The field's text.

property String placeholder

A string to display when there is no other text in the text field.

Apple.TextField {
    placeholder: "Search..."
}

property Apple.TextField.BorderStyle borderStyle: .RoundedRect

Apple.TextField.BorderStyle.RoundedRect

Displays a rounded-style border for the text field.

Apple.TextField.BorderStyle.None

The text field does not display a border.

Apple.TextField.BorderStyle.Line

Displays a thin rectangle around the text field.

Apple.TextField.BorderStyle.Bezel

Displays a bezel-style border for the text field. This style is typically used for standard data-entry fields.

property Apple.TextField.ClearButtonMode clearButtonMode: .Always

Apple.TextField.ClearButtonMode.Always

Show the clear button whenever the field has text.

Apple.TextField.ClearButtonMode.Never

Never show the clear button.

Apple.TextField.ClearButtonMode.WhileEditing

Show the clear button when the field is being edited and has content.

Apple.TextField.ClearButtonMode.UnlessEditing

Show the clear button whenever the field has text and is not being edited.