Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
XCode landscape orientation — Gideros Forum

XCode landscape orientation

totebototebo Member
edited September 2016 in General questions
Before I drive myself crazy, I was wondering if anyone has achieved this on and iPad running iOS:

1. Loading screen/storyboard showing landscape
2. Game showing landscape
3. No autorotation

I seem to be able to get one out of three, but never all of them.
My Gideros games: www.totebo.com

Comments

  • No one released a landscape game on iOS?!
    My Gideros games: www.totebo.com
  • totebototebo Member
    edited September 2016
    I managed to make it work. This is what I had to do in XCode:

    1. Untick "Portrait" and "Upside down" for iPhone and iPad under "General/Deployment Info"
    2. Remove this code from ViewController.m
    - (NSUInteger)supportedInterfaceOrientations
    {
        /*NSArray *supportedOrientations = [[NSBundle mainBundle] objectForInfoDictionaryKey:<a href="http://forum.giderosmobile.com/profile/UISupportedInterfaceOrientations" rel="nofollow">@UISupportedInterfaceOrientations</a>];
         NSUInteger result = gdr_supportedInterfaceOrientations();
         BOOL supported = false;
         for (NSNumber *orientation in supportedOrientations) {
         if((result & [orientation integerValue]) != 0){
         supported = true;
         break;
         }
         }
         if(supported)
         return result;
         else
         return UIInterfaceOrientationMaskAll;*/
        return gdr_supportedInterfaceOrientations();
    }
    My Gideros games: www.totebo.com
  • I managed to get it to work without changes for this:
    https://itunes.apple.com/us/app/save-the-martians!/id946430936?mt=8
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • totebototebo Member
    edited September 2016
    Cool! Hard to tell, though, since the startup image is just black. That is my main beef; I want the player to know the game is landscape immediately, as soon as they tap the icon.

    It turns out that although the above technique solves it for the final build, the gideros player gets cropped when you export your project to it the second time. I'm guessing this is because the Gideros player is always actually in portrait (judging by the IP info that comes up which is always in portrait).
    My Gideros games: www.totebo.com
  • ar2rsawseenar2rsawseen Maintainer
    Accepted Answer
    @totebo
    this is the difference between player and exported projec behavior.

    Player will always be in portrait
    exported app behaves differently, so you need to test specifically with that

    Likes: totebo

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.