I have a a textField object in my iPad app. I would like to give the user a convenient keyboard for entering numbers. In my code I added:
UITextField *textField = [[UITextField alloc] initWithFrame:frame];
textField.keyboardType = UIKeyboardTypeDecimalPad;
According to the docs this is a valid keyboard type but when I edit the text field the normal ASCII keyboard comes up. However, when I change it to:
textField.keyboardType = UIKeyboardTypePhonePad;
Ideally I would like a keyboard that only has the numbers and decimal point but is this not possible on the iPad? Does anyone have a definitive list of which keyboards work on the iPhone vs. iPad? Apple is unclear on this point. I also saw this question which is similar but none of the answers really address my point.
These are the UIKeyboardTypes that can be used on both iOS devices. From the docs:
Here are some screenshots of the different types of keyboards.