views:

422

answers:

1

I'm making an iPhone application that has my own custom text view that can display multi-formatted text and I need to interact with the keyboard somehow. Right now I am using a hidden UITextField and the delegate method textField:shouldChangeCharactersInRange:replacementString: to get the typed characters. However this feels kludgy and I was wondering if it's possible to show the keyboard and get notified of each key tap without using a UITextField or UITextView?

Thanks,

Kyle

+3  A: 

In the public API, the best you can do is as you described. UIKeyboard and UIKeyboardImpl are both private unfortunately.

rpetrich
I agree. I implemented something similar to Kyle's after not finding a better way.
Kailoa Kadano
Thanks, I was afraid of that. I guess I'll go with a hidden text field.
Kyle