add inputtype

This commit is contained in:
tracy
2020-06-12 16:33:16 +08:00
committed by osborn
parent 6b1040b8a2
commit 8e8999dd7a
4 changed files with 82 additions and 3 deletions

View File

@@ -132,7 +132,31 @@ - (void)blendView:(DoricInputView *)view forPropName:(NSString *)name propValue:
} else if ([name isEqualToString:@"maxLength"]) {
self.maxLength = prop;
} else {
}
else if([name isEqualToString:@"inputType"]){
switch ([prop integerValue]) {
case 1: {
// [self.view setKeyboardType: UIKeyboardTypeNumberPad ];
break;
}
case 2: {
[self.view setKeyboardType: UIKeyboardTypeDecimalPad];
break;
}
case 3: {
[self.view setKeyboardType: UIKeyboardTypeAlphabet];
break;
}
case 4: {
[self.view setKeyboardType: UIKeyboardTypePhonePad];
break;
}
default: {
break;
}
}
}
else {
[super blendView:view forPropName:name propValue:prop];
}
}