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?
views:
1914answers:
1
+2
A:
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.
Ramin
2009-07-16 21:32:35
thanks for the idea, I came up with an alternative solution. I made a uitextfield and disabled the "user interaction". Then i created an invisible custom button on top of the uitextfield that targets a function that launches the keyboard.
tul697
2009-07-20 14:37:07
I have followup question now. Is there a way to enable the cursor even after disabling "user interaction"?
tul697
2009-07-20 17:38:12