0
votes

I'm developing an iOS app for iPad. I'am using sencha touch 2 with cordova 3.9. I'm generate my app using phonegap builder. The problem is in a first load

  • when the device is portrait. And I open my app. Its run normal. and when the app already open. then i turn landscape its also run normal.
  • But when the device is landscape, then I open my app for the first time, the display is mess (like in pic)

enter image description here

Anyone can help? my iPad is iOS 9 btw. Thanks in advance

1
Did you used orientation config in Config.xml file ?Mohit Saxena
no, the orientation in config.xml i set "default"Galih D. Seno

1 Answers

0
votes

Are you handling orientation in any way in your code? How do you create first view when the app is launch? If you are supporting both orientation, it is a good practice to handle orientation yourself. To do so, create two different views for different orientations, and in the controller, create appropriate view based on the orientation at the launch.

You must also handle orientationChange event on viewport. But that is not very difficult to do. If you do not want to make it so complex, you can alternatively just support one orientation and do not care about anything else. To do so, you can simply lock the orientation in config.xml of your application. Here, I have written a guide to create orientation aware mobile applications using Sencha Touch and Apache Cordova - http://developers.de/blogs/indraneel/archive/2016/08/18/guide-to-create-orientation-awareness-in-sencha-touch-apache-cordova-app-part-1.aspx Might help you.