Hello,
I'm using a trick to overlay the keyboard with my own. Basically I add some buttons as Subviews to the Keyboard. This is how I find the UIView of the keyboard:
UIWindow* tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:1];
UIView* keyboard;
for(UIView* potentialKeyboard in tempWindow.subviews)
// if the real keyboard-view is found, remember it.
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 3.2) {
if([[potentialKeyboard description] hasPrefix:@"<UIPeripheralHost"] == YES)
keyboard = potentialKeyboard;
}
else {
if([[potentialKeyboard description] hasPrefix:@"<UIKeyboard"] == YES)
keyboard = potentialKeyboard;
}
This method is called by the UIKeyboardDidShowNotification. I'd rather have it called by UIKeyboardWillShowNotification, since the "Did" version shows after the original keyboard is shown to the user. But if I use the same procedure as above it produces a EXC_BAD_ACCESS error. Apparently the keyboard's view is not found properly.
Now my question: Is there any way to access the keyboard's UIView at the time UIKeyboardWillShowNotification is fired.
Thanks in advance