Re-scaling Issues on iOS 7+


#1

While testing a simple app with side menu in iOS i’ve come with a couple of issues:

  • iPhone iOS7+: the app runs in portrait mode, when turning the device the app is not switching to landscape.
  • iPad mini iOS7+: the app switchs between portarit and landscape but in landscape a portion of the bottom screen is black (i suppose the view is not rescaling the right way). The error persists if you switch back to portrait. Also happens when opening the keyboard on landscape: the portion of the screen that the keyboard occupies becomes black and persists when closing the keyboard. As i cannot run the iPhone in landscape i don’t know if this is also reproducing on it. I saw something like this is happening here: Landscape mode view height issue

As for the app particularities, nothing fancy, just a simple ‘todo-like’ app with some backend and nothing more. No additional codova plugins.

The app behaves the right way in the Android tests (Nexus 7 4.4+).

Anyone can give me a hint on why is this happening?


#2

I don’t have ideas for the other issues, but the landscape on the iOS 7 is probably due to Xcode. In Xcode, you tell the app what orientations it can have. The default for iPhone/iPod is portrait only. You need to modify this to get landscape to work.


#3

Thanks, now the iPhone switches to landscape and it has no problems with the viewport like the iPad mini.

Now with iPad, after a few tries i can see the problem is clearly with the keyboard. I saw there is the https://github.com/driftyco/ionic-plugins-keyboard but i have no experience with cordova plugins, maybe you can help me.

I installed the cordova plugin:

cordova plugin add  https://github.com/driftyco/ionic-plugins-keyboard.git

I updated my config.xml:

<feature name="Keyboard">
   <param name="ios-package" value="IonicKeyboard" onload="true" />
</feature>

Now i’m a bit lost. Is there any other configuration i need to do to solve the issue? I understand i have to initialize it from javascript somewhere but, where?

Thanks in advance.


#4

Oh wow, after some hours trying nasty hacks, the problem is the split keyboard option on iOS.

I don’t have normal iPad to test but if someone could, i’m curious. The bug reproduces for me when, in landscape and with split keyboard, focus on some input and the keyboard shows up.