可以使类型为UIKeyboardTypeNamePhonePad的键盘在手机模式下启动吗? [英] Can keyboard of type UIKeyboardTypeNamePhonePad be made to start in phone mode?
问题描述
有没有办法有一个键盘类型UIKeyboardTypeNamePhonePad开始在电话号码垫模式而不是字母?键盘适合我需要的,但我想它开始在其他模式,因为这是更可能的用户将进入。
Is there some way to have a keyboard of type UIKeyboardTypeNamePhonePad start in phone number pad mode rather than alphabetic? The keyboard works well for what I need but I'd like it to start in the "other" mode since that is more likely what the user will enter.
推荐答案
我认为通过将 keyboardType
属性设置为 UIKeyboardTypeNumbersAndPunctuation
,您将默认使用数字和标点符号视图,同时仍然可以选择返回ABC视图。 Apple的文档: http:// developer .apple.com / library / ios /#documentation / uikit / reference / UITextInputTraits_Protocol / Reference / UITextInputTraits.html
I believe that by setting the keyboardType
property to UIKeyboardTypeNumbersAndPunctuation
, you will default to the numbers and punctuation view, while still having the option of returning to the "ABC" view. Apple's documentation on it: http://developer.apple.com/library/ios/#documentation/uikit/reference/UITextInputTraits_Protocol/Reference/UITextInputTraits.html
相关问题:首先显示默认键盘中的数字,用于UITextField
这篇关于可以使类型为UIKeyboardTypeNamePhonePad的键盘在手机模式下启动吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!