Skip to content

TextField

Text field in an alert.

Use the text field to customize the appearance of the text entered into it.

You do not create create instances of this. Instead you should add a text field to an Alert using the addTextField() and addSecureTextField() on the alert.

text

Text in the text field.

text: string

placeholder

Placeholder shown in the text field while it is empty.

placeholder: string

isSecure

Hides the text that is entered when set to true.

The default value is false.

isSecure: bool

textColor

Color of the text.

textColor: Color

font

Font of the text.

font: Font

-setDefaultKeyboard

Use the default keyboard for entering text.

setDefaultKeyboard()

-setNumberPadKeyboard

Use a keyboard that prominently features the numbers 0 through 9.

setNumberPadKeyboard()

-setDecimalPadKeyboard

Use a numeric keyboard with a decimal point for entering text.

setDecimalPadKeyboard()

-setNumbersAndPunctuationKeyboard

Use a numeric keyboard with punctuation for entering text.

setNumbersAndPunctuationKeyboard()

-setPhonePadKeyboard

Use a keyboard that prominently feaetures the numbers 0 through 9 and the * and # characters.

setPhonePadKeyboard()

-setWebSearchKeyboard

Use a keyboard that prominently features the space and period characters.

setWebSearchKeyboard()

-setEmailAddressKeyboard

Use a keyboard that prominently features the @, period and space characters.

setEmailAddressKeyboard()

-setURLKeyboard

Use a keyboard that prominently faetures the period and slash characters and the ".com" string.

setURLKeyboard()

-setTwitterKeyboard

Use a keyboard that prominently features the @ and # characters.

setTwitterKeyboard()

-leftAlignText

Left aligns the text.

leftAlignText()

This is the default text alignment.


-centerAlignText

Center aligns the text.

centerAlignText()

-rightAlignText

Right aligns the text.

rightAlignText()