title: How do I rotate from landscape to portrait upon loading a view?
body: <p>I'm working on a module for a project where the screen is in landscape mode when I get it. I have to load a new view, and switch to portrait mode. While this seems simple enough, I have not been able to find a simple solution. Here's what I tried:</p>
  
  <pre><code>[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait];
  locationsView =[[LocationsViewController alloc] initWithNibName:@"LocationsViewController" bundle:nil];
  [self.view addSubview:locationsView.view];
  </code></pre>
  
  <p>and that did not work like I needed. It rotated the status bar to portrait mode, but not the rest of the view. </p>
  
  <p>Any suggestions?</p>
  
  <p>Thomas</p>