可以使类型为UIKeyboardTypeNamePhonePad的键盘在手机模式下启动吗? [英] Can keyboard of type UIKeyboardTypeNamePhonePad be made to start in phone mode?

查看:224
本文介绍了可以使类型为UIKeyboardTypeNamePhonePad的键盘在手机模式下启动吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法有一个键盘类型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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆