added decimalPad to input options

This commit is contained in:
Felix Wehnert
2014-08-18 10:31:05 +02:00
parent e614300c11
commit 8532bfc35b
5 changed files with 15 additions and 0 deletions
@@ -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"];
+5
View File
@@ -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";
```
+3
View File
@@ -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],
+1
View File
@@ -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";