Thanks to visit codestin.com Credit goes to docs.coronalabs.com
Type String Object TextField Library native.* Revision Release 2026.3728 Keywords keyboard, text input, text field, native text See also object.setSelection
This iOS-only property controls the type of clear text button is that is presented. Possible values are:
"UITextClearButtonModeNever"
"UITextClearButtonModeWhileEditing"
"UITextClearButtonModeUnlessEditing"
"UITextClearButtonModeAlways"
Please consult the iOS documentation on UITextFieldViewMode for an explanation of each behavior.
local field = native.newTextField( 50, 150, 220, 36 ) field.clearButtonMode = "UITextClearButtonModeUnlessEditing"