Reputation: 2990
I am using a UITextField to get input for a price field. Since it is for price, I wanted to make a custom keyboard for just a numpad and a decimal button. I have the keypad view setup, however, I dont' know how to disable the default iphone keyboard completely. Any ideas?
Upvotes: 1
Views: 4685
Reputation: 7068
This could be done in the Interface Builder:
Choose Numbers and Punctuation
Upvotes: 0
Reputation: 13433
You can subclass UITextField
and override canBecomeFirstResponder
. Return NO and it will never put up a keyboard. However, you'll need to be in charge of handling touches so you can enable/disable your own keyboard. This may affect cut/copy/paste behavior so think about whether you really want to do this.
Upvotes: 2