I'm making a custom input method for the iPad, I want to be able to replace the system keyboard with my input method and enter text via that input method.
According to the documentation all I need to do is to set the inputView property with my view and it will be used instead of the system keyboard. I did that and it works, as far as showing the keyboard but how do I actually enter text into the text view?
Supposedly the text view needs to adopt the UIKeyInput and I can use the protocol's methods to enter the text but in reality UITextView doesn't adopt this protocol. conformsToProtocol:@protocol(UIKeyInput)
returns NO and "deleteBackwards" is not implemented (insertText and hasText are implemented. In addition to that, "insertText" doesn't cause the textViewDidChange:
delegate method to be invoked. Obviously I need to send the UIKeyInput
method to some other object (a field editor?) but how do I get it?
Any ideas?