object.clearButtonMode

Type String
Object TextField
Library native.*
Revision Release 2024.3703
Keywords keyboard, text input, text field, native text
See also object.setSelection

Overview

This iOS-only property controls the type of clear text button is that is presented. Possible values are:

Please consult the iOS documentation on UITextFieldViewMode for an explanation of each behavior.

Example

local field = native.newTextField( 50, 150, 220, 36 )
field.clearButtonMode = "UITextClearButtonModeUnlessEditing"