added decimalPad to input options
This commit is contained in:
@@ -32,6 +32,7 @@ NSString *const kEmail = @"email";
|
||||
NSString *const kTwitter = @"twitter";
|
||||
NSString *const kNumber = @"number";
|
||||
NSString *const kInteger = @"integer";
|
||||
NSString *const kDecimal = @"decimal";
|
||||
NSString *const kPassword = @"password";
|
||||
NSString *const kPhone = @"phone";
|
||||
NSString *const kUrl = @"url";
|
||||
@@ -78,6 +79,10 @@ NSString *const kNotes = @"notes";
|
||||
// Integer
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kInteger rowType:XLFormRowDescriptorTypeInteger title:@"Integer"];
|
||||
[section addFormRow:row];
|
||||
|
||||
// Decimal
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kDecimal rowType:XLFormRowDescriptorTypeDecimal title:@"Decimal"];
|
||||
[section addFormRow:row];
|
||||
|
||||
// Password
|
||||
row = [XLFormRowDescriptor formRowDescriptorWithTag:kPassword rowType:XLFormRowDescriptorTypePassword title:@"Password"];
|
||||
|
||||
@@ -158,6 +158,11 @@ static NSString *const XLFormRowDescriptorTypeInteger = @"integer";
|
||||
```
|
||||
Will be represented by a `UITextField` with `UIKeyboardTypeNumberPad`.
|
||||
|
||||
```objc
|
||||
static NSString *const XLFormRowDescriptorTypeDecimal = @"decimal";
|
||||
```
|
||||
Will be represented by a `UITextField` with `UIKeyboardTypeDecimalPad`.
|
||||
|
||||
```objc
|
||||
static NSString *const XLFormRowDescriptorTypeTextView = @"textView";
|
||||
```
|
||||
|
||||
@@ -100,6 +100,9 @@
|
||||
else if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeInteger]){
|
||||
self.textField.keyboardType = UIKeyboardTypeNumberPad;
|
||||
}
|
||||
else if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeDecimal]){
|
||||
self.textField.keyboardType = UIKeyboardTypeDecimalPad;
|
||||
}
|
||||
else if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypePassword]){
|
||||
self.textField.autocorrectionType = UITextAutocorrectionTypeNo;
|
||||
self.textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
|
||||
|
||||
@@ -154,6 +154,7 @@
|
||||
XLFormRowDescriptorTypePassword: [XLFormTextFieldCell class],
|
||||
XLFormRowDescriptorTypeNumber: [XLFormTextFieldCell class],
|
||||
XLFormRowDescriptorTypeInteger: [XLFormTextFieldCell class],
|
||||
XLFormRowDescriptorTypeDecimal: [XLFormTextFieldCell class],
|
||||
XLFormRowDescriptorTypeSelectorPush: [XLFormSelectorCell class],
|
||||
XLFormRowDescriptorTypeSelectorPopover: [XLFormSelectorCell class],
|
||||
XLFormRowDescriptorTypeSelectorActionSheet: [XLFormSelectorCell class],
|
||||
|
||||
@@ -76,6 +76,7 @@ static NSString *const XLFormRowDescriptorTypePhone = @"phone";
|
||||
static NSString *const XLFormRowDescriptorTypeTwitter = @"twitter";
|
||||
static NSString *const XLFormRowDescriptorTypeAccount = @"account";
|
||||
static NSString *const XLFormRowDescriptorTypeInteger = @"integer";
|
||||
static NSString *const XLFormRowDescriptorTypeDecimal = @"decimal";
|
||||
static NSString *const XLFormRowDescriptorTypeTextView = @"textView";
|
||||
static NSString *const XLFormRowDescriptorTypeSelectorPush = @"selectorPush";
|
||||
static NSString *const XLFormRowDescriptorTypeSelectorPopover = @"selectorPopover";
|
||||
|
||||
Reference in New Issue
Block a user