Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Landscape orientation on iOS with proper orientation of system messages - Gideros Forum

Landscape orientation on iOS with proper orientation of system messages

boriskeyboriskey Member
edited September 2014 in General questions
I saw a couple threads on this but still cannot make it work. My app is designed for landscape mode only and when I select autorotation for iPad / iPhone in project export settings, it seems to be working fine and autorate to landscape right or landscape left.

The problem is iOS messages - they are still shown in portrait mode. I tried to disable portrait and upsidedown modes leaving only landscape modes in Xcode build settings, but getting this error:

*** Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation', reason: 'Supported orientations has no common orientation with the application, and shouldAutorotate is returning YES'

is there a way to implement landscape mode properly?

Comments

  • i removed all files under assets folder, re-exported them again and compiled - looks like it works fine now. I left all orientation modes in xcode enabled, but in Gideros Studio, I picked Landscape-right in project properties and auto-rotate for iphone/ipad.
  • RickyngkRickyngk Member
    edited September 2014
    i removed all files under assets folder, re-exported them again and compiled - looks like it works fine now. I left all orientation modes in xcode enabled, but in Gideros Studio, I picked Landscape-right in project properties and auto-rotate for iphone/ipad.
    But by this way, launch image will not work properly. I try some other ways but no help

    It seems this issue is related to this thread http://stackoverflow.com/questions/24150359/is-uiscreen-mainscreen-bounds-size-becoming-orientation-dependent-in-ios8
  • ar2rsawseenar2rsawseen Maintainer
    edited September 2014
    but if bounds are interface oriented, then something should have been left the way it was earlier, like frame should not be interface oriented, just to provide an easier fallback to all those earlier libraries and code. As in it should be somehow backwards compatible, right? Which company would break such behavior easily without leaving easy options to fallback?

    Oh wait, it's Apple.
    Nevermind

    [rant mode off]
  • @Rickyngk oh wow, so did you find the best way to address that?
  • Most probably there will be another if ios8+ do this else do that
    but need to upgrade to really test it
  • @Rickyngk oh wow, so did you find the best way to address that?
    Unfortunately, I did not found any good enough solution. I have to:

    + turn off all supported device orientation
    + remove all splash screens (use white splash screen).
    + Modify shouldAutorotate
    -(BOOL)shouldAutorotate
    {
        UIDeviceOrientation orientation = [UIDevice currentDevice].orientation;
        return gdr_shouldAutorotateToInterfaceOrientation((UIInterfaceOrientation)orientation);
    }
    + Change supportedInterfaceOrientations
    - (NSUInteger)supportedInterfaceOrientations
    {
        return UIInterfaceOrientationMaskAll;
        //return gdr_supportedInterfaceOrientations();
    }
  • @Rickyngk thanks for sharing! I will test this more tonight but do you know if this will also work for ios7? I have only one device (iPad 3 with 7.1) and before I upgrade to 8 I could test your code on it.

    Do you still use autorotate option when you export a project in Gideros Studio?
Sign In or Register to comment.