title: Landscape xib appears as portrait
body: <p>I have a view controller and separate nib files for portrait and landscape. On rotating, I load the respective nib. The methods </p>
  
  <pre><code> shouldAutorotateToInterfaceOrientation and willRotateToInterfaceOrientation
  </code></pre>
  
  <p>get called and the nib does change. </p>
  
  <p>The problem: </p>
  
  <pre><code>the landscape nib does not appear as landscape, but portrait! The status bar is
  correctly rotated and appears on the top:
  (Sorry, couldn't paste the image, because my account is new. The screenshot is in   
  landscape, with a landscape status bar, but a landscape view shown as portrait.)
  </code></pre>
  
  <p>One would think the problem lies in not setting the orientation as Landscape in IB Simulated metrics for the view, but I've done that and the view appears as landscape in IB. (I don't think it would even be possible to create a rotated button like that if the view was portrait.) Besides these two nibs I have a <strong>mainwindow.xib</strong>, which contains the app delegate, window and view controller objects.</p>
  
  <p>EDIT: I realized that the views are actually rotating, when they should "stay up". It's like there's an extra transformation. When I rotate the phone 90° right, the landscape xib is displayed rotated 90° right. When I rotate the phone another 90° right, the portrait xib is displayed upside down. The status bar is always correctly displayed at the top.</p>
  
  <p>EDIT2: Using </p>
  
  <pre><code>self.view.transform = CGAffineTransformMakeRotation((M_PI * (90) / 180.0));
  </code></pre>
  
  <p>in willRotateToInterfaceOrientation I can rotate the view to landscape left (and to any orientation I want), so I can use that as a workaround. However, I have other projects, where the view rotates automatically and doesn't require the use of CGAffineTransformMakeRotation. It's like something is preventing the automatic rotation here.</p>