【发布时间】:2011-02-11 07:36:00
【问题描述】:
为“邮政编码/邮政编码”字段创建了一个 UITextField,其键盘类型为 UIKeyboardTypeDefault。我想使用默认键盘,但希望数字和符号默认显示为与字母并列。
当您在 Contacts.app 中输入地址时,Apple 会执行此操作。
有人知道如何完成这项工作吗?
【问题讨论】:
标签: iphone objective-c cocoa-touch iphone-softkeyboard
为“邮政编码/邮政编码”字段创建了一个 UITextField,其键盘类型为 UIKeyboardTypeDefault。我想使用默认键盘,但希望数字和符号默认显示为与字母并列。
当您在 Contacts.app 中输入地址时,Apple 会执行此操作。
有人知道如何完成这项工作吗?
【问题讨论】:
标签: iphone objective-c cocoa-touch iphone-softkeyboard
您想要UIKeyboardTypeNumbersAndPunctuation 键盘类型。
【讨论】:
还有一个executor21所说的代码示例:
UITextField* txt = [[UITextField alloc] init];
txt.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
【讨论】: