object.inputType

Type String
Object TextField
Library native.*
Revision Release 2024.3703
Keywords keyboard, keyboard type, text input, text field, native text

Overview

Sets the keyboard type for a native text input field.

Keyboard Types

Possible string values are:

iOS Extensions

The following values are iOS-specific and correspond to the names of actual constants in the iOS API:

  • "UIKeyboardTypeASCIICapable"
  • "UIKeyboardTypeNumbersAndPunctuation"
  • "UIKeyboardTypeNamePhonePad"
  • "UIKeyboardTypeTwitter"
  • "UIKeyboardTypeWebSearch"

Please consult the iOS documentation on UIKeyboardType for an explanation of each keyboard type.

Gotchas

Example

local numericField = native.newTextField( 50, 150, 220, 36 )
numericField.inputType = "number"