It is simple to set keyboard type for your TextField
First of all, let's get enum
typedef enum {
UIKeyboardTypeDefault,
UIKeyboardTypeASCIICapable,
UIKeyboardTypeNumbersAndPunctuation,
UIKeyboardTypeURL,
UIKeyboardTypeNumberPad,
UIKeyboardTypePhonePad,
UIKeyboardTypeNamePhonePad,
UIKeyboardTypeEmailAddress,
UIKeyboardTypeAlphabet = UIKeyboardTypeASCIICapable
} UIKeyboardType;
// set keyboard type to UITextField, Done.
[textField setKeyboardType:UIKeyboardTypeDecimalPad];
here is the detail from Share Our Ideas.

0 意見:
張貼留言