我正在尝试以下方法,但没有运气.当用户单击 UiTextfield 时,我需要将键盘视图自动更改为数字视图,这可能吗?
I'm trying the following with no luck. When the user click on a UiTextfield I need to change the keyboard view to the numeric view automatically, is this possible?
UITextInputTraits
协议(UITextField
符合)具有 UIKeyboardType
类型的 keyboardType
属性.
The UITextInputTraits
protocol (which UITextField
conforms to) has a keyboardType
property of type UIKeyboardType
.
myTextField.keyboardType = UIKeyboardTypeNumberPad;
这篇关于如何在 iPhone 上默认显示数字键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!