UIInterfaceOrientation kinda works...

Discussion in 'iOS Programming' started by fixie rider, Oct 9, 2008.

  1. fixie rider macrumors newbie

    fixie rider

    Sep 28, 2008
    I'm trying to get my app to only work in landscape mode only. The UIInterfaceOrientation key seems to work fine on my device, but weird things happen in the simulator. It will start in landscape and then flip to portrait automatically.

    Can anyone else confirm this?
  2. SqueegyX macrumors regular

    Mar 24, 2008
  3. fixie rider thread starter macrumors newbie

    fixie rider

    Sep 28, 2008
    Yeah. It seems to work fine, but I'll just do a rotate to be consistent. Thanks.
  4. jasonslater macrumors newbie

    Oct 10, 2008
    I've managed to get this to work by adding this into my AppDelegate class (in the applicationDidLoad function):
    [[UIApplication sharedApplication] setStatusBarOrientation: UIInterfaceOrientationLandscapeRight animated: YES];

    And then rotate each of the views

Share This Page