Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know whether the keyboard appearing is Split or normal?

Tags:

ios

ipad

In my iPad app, I am posting keyboard notification that will bring the popover to a certain height above the keyboard. This works fine with the normal keyboard. But then in iOS 5, if the user selects Split keyboard, the popover will behave incorrectly. How can I know whether the user has selected the split keyboard, so that I can arrange the popover height according to the keyboard presented?

like image 924
Ganesh Nayak Avatar asked Jan 03 '12 04:01

Ganesh Nayak


People also ask

How do I change my keyboard from Split to normal?

How to get your split iPad keyboard back to normal. Tap a text field in an app to make the keyboard appear. Touch and hold the keyboard button in the bottom right-hand corner of the keyboard. Slide your finger up to either Merge or Dock and Merge, then let go.

How do I turn off split keyboard?

You can also turn off Split keyboard in Settings to make sure you don't run into the issue again. Doing so is simple: Open Settings > General > Keyboard. Tap the switch to turn off Split keyboard.

How do I enable split keyboard?

Use a split keyboard You can type with a split keyboard that's at the bottom of the screen, or undocked and in the middle of the screen. , tap Keyboard Settings, then select Split Keyboard; or go to Settings > General > Keyboard, then turn Split Keyboard on or off.

How do I change my keyboard from floating to normal?

How to get your floating iPad keyboard back to normal. Place two fingers on the floating keyboard. Spread your fingers apart to enlarge the keyboard back to full size, then let go.


1 Answers

The thing is not to overthink this. Nothing of any importance has changed. If the keyboard comes into docked position at the bottom of the screen, you will get a "show" notification. If it leaves the docked position at the bottom of the screen, you will get a "hide" notification. That's exactly what happened before iOS 5.

The only difference is that instead of leaving the docked position because it is moving offscreen, it might be leaving the docked position because the user undocked it. You'll still get a "hide", so you can move your interface back into its base position. You don't need to know that the keyboard is now undocked (though you can find out that it is not offscreen from UIKeyboardDidChangeFrameNotification if you really want to). The reason you don't need to know is that when the keyboard is undocked / split, the user can be proactive and move the keyboard if it's in the way of something that needs to be seen.

Thus, all your old code from before iOS 5 continues to work just fine. It's all really quite clever.

like image 76
Ganesh Nayak Avatar answered Nov 15 '22 17:11

Ganesh Nayak