title: Rotate to landscape for views added to the hierarchy manually (iPhone)
body: <p>I have a simple UIViewController that uses a XIB for its interface.</p>
  
  <p>As such, the interface simply comprises a UIView, a UIActivityIndicator and a UILabel. I have the sizing constraints in Interface Builder set to keep the activity indicator and the label centred when the view rotates.</p>
  
  <p>The UIViewController is set to return YES for portrait and landscape orientations in the <code>-shouldAutorotateToInterfaceOrientation:</code> method.</p>
  
  <p>The view is added to the view hierarchy manually, using</p>
  
  <pre><code>if (!activityOverlay)
      activityOverlay = [[XBActivityOverlayViewController alloc] initWithNibName:@"XBActivityOverlayViewController" bundle:nil message:@"Connecting..."];
  
  [activityOverlay.view setAlpha:0.0f];
  [self.window addSubview:activityOverlay.view];
  [UIView beginAnimations:nil context:nil];
  [UIView setAnimationDuration:0.3f];
  [activityOverlay.view setAlpha:0.9f];
  [UIView commitAnimations];
  </code></pre>
  
  <p>The problem I'm having is that if the device is already in landscape orientation and the view is added to the hierarchy at this point, the view is still in portrait orientation, and doesn't auto rotate.</p>
  
  <p>What do I need to do to add the view in the same orientation as the parent view?</p>