-
Notifications
You must be signed in to change notification settings - Fork 19
6d. Cell: TextField
i_82 edited this page May 24, 2018
·
3 revisions
TextField cell is a plain cell with a UITextField called cellTextField inside.
| Key | Type | Description | Flags | Default |
|---|---|---|---|---|
| alignment | String | cellTextField.textAlignment |
Optional | Natural |
| keyboard | String | cellTextField.keyboardType |
Optional | Default |
| placeholder | String | cellTextField.placeholder |
Optional, Localizable | "" |
| isSecure | Boolean | cellTextField.isSecure |
Optional | false |
| clearButtonMode | String | cellTextField.clearButtonMode |
Optional | Never |
| maxLength | Integer | the maximum length of text | Optional | INT_MAX |
| validationRegex | String | regular expression for value validation | Optional | nil |
| prompt | String | title of prompt | Optional, Localizable | nil |
| message | String | message of prompt | Optional, Localizable | nil |
| okTitle | String | ok button title of prompt | Optional, Localizable | "OK" |
| cancelTitle | String | cancel button title of prompt | Optional, Localizable | "Cancel" |
icon is not supported.
theme Key |
Type | Description |
|---|---|---|
| textColor | color | cellTextField.textColor |
| caretColor | color | cellTextField.tintColor |
| placeholderColor | color | cellTextField.attributedPlaceholder.attributes(at: 0)[NSForegroundColorAttributeName] |
| alignment | Description |
|---|---|
| Left | NSTextAlignmentLeft |
| Center | NSTextAlignmentCenter |
| Right | NSTextAlignmentRight |
| Natural | NSTextAlignmentNatural |
| Justified | NSTextAlignmentJustified |
| keyboard | Description |
|---|---|
| Default | UIKeyboardTypeDefault |
| Alphabet | UIKeyboardTypeASCIICapable |
| ASCIICapable | UIKeyboardTypeASCIICapable |
| NumbersAndPunctuation | UIKeyboardTypeNumbersAndPunctuation |
| URL | UIKeyboardTypeURL |
| NumberPad | UIKeyboardTypeNumberPad |
| PhonePad | UIKeyboardTypePhonePad |
| NamePhonePad | UIKeyboardTypeNamePhonePad |
| EmailAddress | UIKeyboardTypeEmailAddress |
| DecimalPad | UIKeyboardTypeDecimalPad |
| clearButtonMode | Description |
|---|---|
| Never | UITextFieldViewModeNever |
| Always | UITextFieldViewModeAlways |
| WhileEditing | UITextFieldViewModeWhileEditing |
| UnlessEditing | UITextFieldViewModeUnlessEditing |
value Type |
Description |
|---|---|
| String | cellTextField.text |
{
"items": [
{
"cell": "TextField",
"key": "username",
"keyboard": "Alphabet",
"placeholder": "Enter the username"
},
{
"isSecure": true,
"cell": "TextField",
"key": "password",
"keyboard": "Alphabet",
"placeholder": "Enter the password"
}
]
}