title: Default app orientation
body: <p>I have an app written in an older version of Xcode. Right now I'm using Xcode 4.6.1. This is an app I inherited from another developer that was developed outside the company.</p>
  
  <p>One of the problems with this app is its interface. It should default to LandscapeLeft (this is the value set in the pList file). The app ignores this directive and instead defaults to portrait mode.</p>
  
  <p>Is there something I need to do to force the code to honor this value? I'm relatively new to iOS/Objective-C. The code compiles and runs, it's just the interface isn't doing what I want.</p>
  
  <p>It's a little easier since this is an iPad only app.</p>
  
  <p><strong>Edit</strong>
  I've tried adding the following code to one of my problematic viewControllers, but it's not being honored. Any thoughts on how to force this view to landscape? (Is there a setting in the IDE - it looks like Xcode used to have an orientation attribute, but I can't find it in 4.6.1)</p>
  
  <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
      // Overriden to allow any orientation.
      return ((interfaceOrientation==UIInterfaceOrientationMaskLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationMaskLandscapeRight));
  }
  
  - (NSUInteger) supportedInterfaceOrientations
  {
      return UIInterfaceOrientationMaskLandscapeLeft;
  }
  
  - (NSInteger) supportedInterfaceOrientationsForWindow
  {
      return UIInterfaceOrientationMaskLandscape;
  }
  
  - (BOOL) shouldAutoRotate
  {
      return YES;
  }
  </code></pre>