how to add custom keyboard
I did a simple application.
My application contains 10 Text fields.
what i need is i need to hide default keypad i 开发者_JAVA百科place manual keys like this
How can i done this keys works as a keypad to my app.
can any one pls post some code or link.
Thank u in advance.
I wrote a KeyPad, that is easy to customize via its delegate.
Just add a view with 10 buttons and assign action for each of them.
In the didBeginEditing method diss the keyboard using,
[textField resignFirstResponder]
[yourKeyboard show];
And i think apple will reject the applications using custom keyboard
There is a complete thread about that here It has a tutorial, lots of comments, sample code and project, everything you need is there. (Is quite long though)
You basically create a view with your buttons for example and In iOS3.2 and above you can use inputView property of your textField. In early iOS versions you have to do a trick (add your keyboard as a subview of UIKeyboard) that is also written in the link.
If you need more advanced stuff than simple numbers, you probably want to look at UIKeyInput and UITextInput protocols.
Hope it helps
精彩评论