I need (i.e. a customer requirement) to provide a custom keyboard for the user to type text into both text fields and areas. I already have something that does the keyboard
Here's an idea: modify the existing keyboard to your own needs. First, register to be notified when it appears on screen:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(modifyKeyboard:)
name:UIKeyboardWillShowNotification
object:nil];
Then, in your modifyKeyboard
method:
- (void)modifyKeyboard:(NSNotification *)notification
{
UIView *firstResponder = [[[UIApplication sharedApplication] keyWindow] performSelector:@selector(firstResponder)];
for (UIWindow *keyboardWindow in [[UIApplication sharedApplication] windows])
for (UIView *keyboard in [keyboardWindow subviews])
if([[keyboard description] hasPrefix:@"
This adds your view on top of the original keyboard, so make sure you make it opaque.