I'm currently developing an OpenGL ES game for the iPhone and iPod touch.
I was wondering how I can easily pull up the UIKeyboard? Is there an official, documented possibility to pull up a UIKeyboard without using a UITextField of UITextView?
I'm currently developing an OpenGL ES game for the iPhone and iPod touch.
I was wondering how I can easily pull up the UIKeyboard? Is there an official, documented possibility to pull up a UIKeyboard without using a UITextField of UITextView?
I haven't tried it but http://www.cocoadev.com/index.pl?UIKeyboard shows some code that looks like it should work.
It's not "officially" possible - you can't access the UIKeyboard object at all while staying within Apple's guidelines.
Creating an invisible UITextField, then calling [textField becomeFirstResponder]
would do the job - you could even subclass UITextField first, then override the delegate method textField:shouldChangeCharactersInRange:
to redirect the text input to where you want it to go.