iosobjective-cios8iphone-6iphone-6-plus

iOS 8 keyboard layout on iPhone 6/6 Plus


I noticed that on iOS 8, the native keyboard on iPhone 6/6 Plus added some keys in landscape mode. However when I create an app with UITextView, the keyboard is same as iPhone 5 (without the function keys.) As the screenshot, you can see that the height of keyboards are not same, and the keys are different.

So, how do I change the keyboard appearance as the native one on iPhone 6/6 Plus?

Keyboard screenshot


Solution

  • You have to add special launch images for the iPhone 6 and 6 Plus to get the new keyboard layouts.

    The reasoning behind this is that the phone runs your app in a special compatibility mode, that emulates a screen resolution of 320 points in width.

    You can easily see, if your app runs in such a mode by outputting the screen resolution:

    println("bounds = \(UIScreen.mainScreen().bounds)")
    println("nativeBounds = \(UIScreen.mainScreen().nativeBounds)")
    

    Without the designated launch images the output of the iPhone 6 Plus Simulator is:

    bounds = (0.0,0.0,320.0,480.0)
    nativeBounds = (0.0,0.0,960.0,1440.0)
    

    And there will be no special keyboard

    To get a comprehensive understanding of the new resolutions see this great blog entry: http://www.paintcodeapp.com/news/iphone-6-screens-demystified