//键盘的类型
text.keyboardType =UIKeyboardTypeNumberPad;
typedef enum {
UIKeyboardTypeDefault,默认键盘,支持所有字符
UIKeyboardTypeASCIICapable, 支持ASCII的默认键盘
UIKeyboardTypeNumbersAndPunctuation, 标准电话键盘,支持+*#字符
UIKeyboardTypeURL,URL键盘,支持.com按钮只支持URL字符
UIKeyboardTypeNumberPad,数字键盘
UIKeyboardTypePhonePad, 电话键盘
UIKeyboardTypeNamePhonePad, 电话键盘,也支持输入人名
UIKeyboardTypeEmailAddress, 用于输入电子邮件地址的键盘
UIKeyboardTypeDecimalPad,数字键盘有数字和小数点
UIKeyboardTypeTwitter,优化的键盘,方便输入@、#字符
UIKeyboardTypeAlphabet =UIKeyboardTypeASCIICapable,
} UIKeyboardType;
//return键类型
text.returnKeyType =UIReturnKeyDone;
typedef enum {
UIReturnKeyDefault,默认灰色按钮,标有Return
UIReturnKeyGo,标有Go的蓝色按钮
UIReturnKeyGoogle,标有Google的蓝色按钮,用语搜索
UIReturnKeyJoin,标有Join的蓝色按钮
UIReturnKeyNext,标有Next的蓝色按钮
UIReturnKeyRoute,标有Route的蓝色按钮
UIReturnKeySearch,标有Search的蓝色按钮
UIReturnKeySend,标有Send的蓝色按钮
UIReturnKeyYahoo,标有Yahoo的蓝色按钮
UIReturnKeyYahoo,标有Yahoo的蓝色按钮
UIReturnKeyEmergencyCall,紧急呼叫按钮
} UIReturnKeyType;
网友评论