How to make the Number view in keyboard UITextField to become default?
I have a UITextField but my users will prefer enter some number in that field rather than typing text character (like enter a cost a product). So, how can I make the Number View in the keyboard to 开发者_运维知识库become default whenever the user tap into the UITextField?
In interface builder, just set the keyboard field of the UITextField to Number Pad.
You can also do it in code as UITextField conforms to the UITextInputTraits protocol (where you can set the keyboardAppearance and many other things).
精彩评论