iPad portrait mode only?

Discussion in 'iOS Programming' started by newtoiphonesdk, Dec 8, 2011.

  1. newtoiphonesdk macrumors 6502a

    Joined:
    Jul 30, 2010
    #1
    At one time I thought it was required for an iPad app to run in all orientations, however I am seeing more apps like words with friends that only run in portrait mode home button on bottom orientation. Is it now ok for apps on iPad to only run like this?
     
  2. adamtheturtle macrumors member

    Joined:
    Dec 5, 2011
    #2
    There was no time when both orientations were required.
     
  3. newtoiphonesdk thread starter macrumors 6502a

    Joined:
    Jul 30, 2010
    #3
    For the iPad? You sure?
     
  4. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #4
    Portrait/Portrait UpsideDown and LandscapeLeft&LandscapeRight, those should be supported. With that statement I mean.
    If you decide to only support "1" orientation, you should support both upsidedown and normal. This is described in the HiG.
     
  5. newtoiphonesdk thread starter macrumors 6502a

    Joined:
    Jul 30, 2010
    #5
    There are plenty of iPad apps that dont work in upside down mode
     
  6. nickculbertson macrumors regular

    nickculbertson

    Joined:
    Nov 19, 2010
    Location:
    Nashville, TN
    #6
    I've had an app rejected for not supporting "upside down" mode. I've also had them approved with only one orientation. Many things slip through the cracks in the review process. All it takes is one line of code to get an app working in LandscapeRight and LandscapeLeft.

    Nick
     
  7. newtoiphonesdk thread starter macrumors 6502a

    Joined:
    Jul 30, 2010
    #7
    How do you get it working in just the two portrait orientations?
     
  8. thedollarhunter macrumors member

    Joined:
    May 9, 2011
    Location:
    UK
    #8
    Will your one line of code work with an OpenGL app, if so please do share?

    Supporting change of orientation is one of last few things on my list :confused:

     
  9. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #9
    should be something like this in your UIViewController
    Code:
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
        // Return YES for supported orientations
    	return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
    }
     
  10. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #10
    I think the needs of OpenGL apps are slightly different.
     
  11. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #11
    Crap, forgot about that part, nvm :)
     

Share This Page