title: How to set the starting orientation to landscape?
body: <p>Hi I was checking the orientations changes of iOS6 and I made everything work fine except one thing. There is no way to start the app on landscape.</p>
  
  <p>How can I do to start the app on landscape? I found this <a href="https://stackoverflow.com/questions/12520030/how-to-force-a-uiviewcontroller-to-portait-orientation-in-ios-6">How to force a UIViewController to Portrait orientation in iOS 6</a> but that's not working, the app ALWAYS start in portrait and I needed to start it on landscape... </p>
  
  <p>When I go to an other view and then go back to the "initial view" it is on landscape! But when the app starts it's on portrait...</p>
  
  <p>Thank you!!</p>
  
  <p>----------------------------- UPDATE -------------------------------</p>
  
  <p>This is how I'm loading from the app delegate the main view:</p>
  
  <pre><code>self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  myViewController = [[myViewController alloc] init];
  
  self.navController = [[UINavigationController alloc] initWithRootViewController:myViewController] ;
  
  [self.window setRootViewController:navController];
  [self.window makeKeyAndVisible];
  </code></pre>
  
  <p>----------------------------- UPDATE 2------------------------------
  I made it work, I changed the previous code for:</p>
  
  <pre><code>self.navController = [[UINavigationController alloc] init] ;
  [self.window setRootViewController:navController];
  [self.window makeKeyAndVisible];
  [navController presentViewController:myViewController animated:NO completion:NULL];
  </code></pre>
  
  <p>I hope this is useful for someone else!</p>