我正在尝试以下方法,但没有运气。当用户单击 UiTextfield 时,我需要将键盘 View 自动更改为数字 View ,这可能吗?
最佳答案
UITextInputTraits
协议(protocol)(UITextField
符合)具有 UIKeyboardType
类型的 keyboardType
属性。
myTextField.keyboardType = UIKeyboardTypeNumberPad;
关于iphone - 如何在 iPhone 上默认显示数字键盘?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3796772/