there is.
Short introduction. I have an iOS game where a player can enter their name. For input, I use the standard iOS keyboard. The game uses OpenGL ES 2.0 as a rendering engine.
Everything works fine, except when I add the Chinese handwriting keyboard to my iPad, switch to it when you try to enter the playerβs name, and then I very quickly change the input mode from dictation to handwriting and vice versa. So I just sit and accidentally press the dictation button when the handwriting keyboard is active and the "Finish" button when Siri is active.
After a while, the keyboard hangs somewhere between dictation and handwriting. It does not respond to the Finish button. Closing the application and reopening will help, but this is not an option.
In the screenshot ( Screenshot from the keyboard ) you can see that the Siri mode mode dominates the keyboard input mode, but the bottom rectangle is part of the handwriting input mode.
So the question is : can I do something with this problem or have I not got any effect on the iOS keyboard?
PS Additional information: For input, I use a hidden (off-screen) UITextField. When I need to show the keyboard, I make this textField the first responder and the keyboard pops up.
An internal error message appeared: "request caretRectForPosition: from a position outside of NSTextStorage (-1)" which I fixed by creating my own class based on UITextField and overriding this method as follows:
- (CGRect)caretRectForPosition:(UITextPosition *)position { CGRect rect = [super caretRectForPosition:position]; if (rect.origin.x == INFINITY || rect.origin.y == INFINITY) { rect = CGRectMake(0, 0, 0, 0); } return rect; }
This helped fix this internal error, but did not help the keyboard hang.
source share