iOS键盘类型(UIKeyboardType)
| UIKeyboardType | 键盘类型注释 |
|---|---|
| UIKeyboardTypeDefault | 当前键盘的默认类型 |
| UIKeyboardTypeASCIICapable | ASCII码字符键盘 |
| UIKeyboardTypeNumbersAndPunctuation | 数字标点键盘:数字(0-9)+标点(切换按钮) |
| UIKeyboardTypeURL | URL键盘:突出显示 . / .com |
| UIKeyboardTypeNumberPad | 数字键盘:0-9 |
| UIKeyboardTypePhonePad | 数字键盘:0-9 + * + # |
| UIKeyboardTypeNamePhonePad | 联系人键盘:方便新建联系人,数字(纯数字键盘)与字母(或中文输入法)切换 |
| UIKeyboardTypeEmailAddress | EMail键盘:突出显示 @ . |
| UIKeyboardTypeDecimalPad | 数字键盘:0-9 + . |
| UIKeyboardTypeTwitter | Twitter键盘:突出显示 @ # |
| UIKeyboardTypeWebSearch | WebSearch键盘:突出显示 . search(前往) |
问题:在系统使用第三方键盘时,如果对UITextField设置键盘类型为UIKeyboardTypeNumberPad、UIKeyboardTypePhonePad、UIKeyboardTypeNamePhonePad、UIKeyboardTypeDecimalPad这几种时,使用中的三方键盘将会自动切换为系统键盘。
建议解决方案:使用UIKeyboardTypeNumbersAndPunctuation这种类型,代替上面四种类型。








网友评论