Extends Item

Apple.TextField

A iOS styled text input field.

property String text

property Color textColor: #black

The field's text and text color.

property String font: "San Francisco"

property Float size: 14

The field's text font and size.

event accepted()

The text field's accepted event.

As the text is edited, the text property will update with any changes. When the user finishes editing the text, the accepted event will fire. This happens when either the field loses focus, or the return or done keys are pressed.

property String placeholder

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

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

property Apple.TextField.Style style: .Rounded

Apple.TextField.Style.Rounded

Displays a rounded-style border for the text field.

Apple.TextField.Style.None

The text field does not display a border.

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.