Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Orientation switch during splash screen distorts windows

If I boot up my app (which is setup to run in portrait) while holding the iPhone in landscape, the splash screen will rotate an go all distorted. Then, once the app loads, the content of all my windows are squeezed upward about half way up the screen.

Is there a way to force portrait orientation on the splash screen? I tried adding the supported orientation to the plist file, but that had no effect.

— asked October 20th 2010 by Chad Nantais
  • iphone
  • orientation
  • screen
  • splash
0 Comments

4 Answers

  • I have edited mine to only support left or right landscape, but the splash (Default.png) still rotates (animated!) from it's position to landscape mode when the app leads. Very ugly!

    How can this be prevented?

    — answered March 24th 2011 by Richard John
    permalink
    0 Comments
  • I'm trying to do the same only the other way around.
    I need it to force Landscape, from the start and forever, my app cannot ever be put into portrait.

    So I would love to see an anwser on this

    — answered October 20th 2010 by Patrick van Zadel
    permalink
    1 Comment
    • If you only need landscape mode then edit the info.plist to allow only landscape mode:

              <key>UISupportedInterfaceOrientations~ipad</key>
              <array>
                      <string>UIInterfaceOrientationLandscapeLeft</string>
                      <string>UIInterfaceOrientationLandscapeRight</string>
              </array>
              <key>UISupportedInterfaceOrientations</key>
              <array>
                      <string>UIInterfaceOrientationLandscapeLeft</string>
                      <string>UIInterfaceOrientationLandscapeRight</string>
              </array>
      

      Just remove the portrait orientations.

      — commented December 27th 2010 by Daniel Tome
  • I struggled with this too for my app… but I found a very simple solution that has worked like a charm. If all you want to do is lock to a specific aspect just go into the build->iphone directory (it only shows up once the project is compiled). Under that directory is a file called Info.plist. Edit it in your favorite text editor and you'll see the following lines:

        <key>UISupportedInterfaceOrientations</key>
            <array>
            <string>UIInterfaceOrientationPortrait</string>
            <string>UIInterfaceOrientationLandscapeRight</string>
            <string>UIInterfaceOrientationLandscapeLeft</string>
        </array>
        <key>UISupportedInterfaceOrientations~ipad</key>
        <array>
            <string>UIInterfaceOrientationPortrait</string>
            <string>UIInterfaceOrientationPortraitUpsideDown</string>
            <string>UIInterfaceOrientationLandscapeLeft</string>
            <string>UIInterfaceOrientationLandscapeRight</string>
        </array>
    

    Just take out the ones you don't want. Fire your app up and you'll be set on the specific orientation you want. There might be times when this gets overwritten, so you'd need to keep an eye on it, but that has been working for me.

    — answered November 22nd 2010 by eric martinson
    permalink
    0 Comments
  • Just edit the tiapp.xml and make changes according to your requirements

    — answered August 3rd 2012 by gk reddy
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.