Something like that? I canβt remember where I found this code, but I used it to switch the on-screen keyboard because it would be hidden by default if bluetooth was connected.
- (void) toggleKeyboard(UIKeyboardImpl * keyImpl){ if (UIKeyboardAutomaticIsOnScreen()) { UIKeyboardOrderOutAutomatic(); } else { UIKeyboardOrderInAutomatic(); }
Edit
I found where I have this code. It works fine, but to catch that you need to import the private GraphicsServices infrastructure, which is likely to cause your application to stray from the app store.
David
source share