Reputation: 18741
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?
Upvotes: 0
Views: 334
Reputation: 16827
You can also do it in code as UITextField conforms to the UITextInputTraits protocol (where you can set the keyboardAppearance and many other things).
Upvotes: 0
Reputation: 6095
In interface builder, just set the keyboard field of the UITextField to Number Pad.
Upvotes: 3