How can one enable keyboard like in iMessages/FB Messenger in landscape mode at iOS8?
Asked Answered
M

2

3

In my project I have textViews with associated input keyboard which has the strange look in landscape mode on iPhone 6 Plus under iOS8 as shown below:

enter image description here

It seems that it has different orientation internally sometimes.

But in some cases keyboard rotates fine but still has white gaps during orientation change and other visible bugs:

enter image description here

and finally we have ordinary expanded landscape view:

enter image description here

The question is how one can get the extended keyboard without bugs as follows:

enter image description here

Mcclimans answered 6/11, 2014 at 19:59 Comment(0)
M
4

The very important thing to do while migrating projects from xCode5.1 (and earlier) to xCode6 is to modify Info.plist file by adding Launch screen interface file base name key

enter image description here

You can event set it to empty string (usually it is a name of the Launch xib). Without this simply line one will have all the problems presented at screenshots above.

The absence of the Launch screen interface file base name results in working in compatibility mode with standard resolution of older devices. Let's run the following code in the project in each case

NSLog(@"bounds = %@", NSStringFromCGRect(UIScreen.mainScreen.bounds));

With Launch xib one gets

bounds = {{0, 0}, {414, 736}} // for iPhone 6Plus

bounds = {{0, 0}, {375, 667}} // for iPhone 6

Without it one gets

bounds = {{0, 0}, {320, 568}}

So, the last case indeed is the compatibility mode.

Mcclimans answered 13/11, 2014 at 0:32 Comment(2)
having a flow like this: 1. portrait screen----enable keyboard----opens keyboard in portrait 2. go to next screen which is landscape----enable keyboard by clicking textfield----opens keyboard in landscape mode. 3. go back to portrait screen-----enable keyboard----opens keyboard in landscape. what to do...above solution didn't help.Throaty
Its not working for my case also. Please do provide any alternate solutionPretorius
A
0

I found the same kind of problem. When I was allowing only 1 of my viewcontroller to rotate.As soon as I was going inside the screen I was enabling the screen rotation and while coming out of the screen I was disabling it.Every thing was working fine except the keyboard UI.So I searched many forums for a solution but didn't find out anything useful. Anyhow, I have tried to understand the pattern and found out that I was using viewDidDisappear instead of viewWillDisappear.

Its important to disable the orientation before it goes another screen.Hope this helps.

Anemoscope answered 19/5, 2015 at 9:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.