title: UINavigationController Auto-Rotation to Landscape does not update UIView frame
body: <p>I'm working on an application that operates entirely in landscape mode (UIStatusBarHidden=YES and UIInterfaceOrientation=UIInterfaceOrientationLandscapeRight). I'm using a NavigationController, with my rootViewController (MainViewController) setup like this:</p>
  
  <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
  }
  </code></pre>
  
  <p>In my MainViewController, I'm loading the view like this:</p>
  
  <pre><code>- (void)loadView {
    CGRect frame = [[UIScreen mainScreen] applicationFrame]; // This returns a portrait frame
    MainView *view = [[MainView alloc] initWithFrame:frame];
    self.view = view;
    [view release];
  }
  </code></pre>
  
  <p>Then in MainView, I'm loading subviews like this:</p>
  
  <pre><code>- (id)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
      self.pdfView = [[PDFView alloc] initWithFrame:frame];
      [self addSubview:pdfView];
    }
     returnself;
  }
  </code></pre>
  
  <p>My issue is that MainView renders correctly in landscape mode (despite the frame passed into [MainView initWithFrame:] being in portrait), while the child PDFView renders into a portrait frame. I have also experimented with applying transforms in my [UIView initWithFrame:] implementations like this:</p>
  
  <pre><code>view.center = CGPointMake(view.frame.size.height/2.0, view.frame.size.width/2.0);
  view.transform = CGAffineTransformRotate(view.transform, (M_PI/2.0));
  </code></pre>
  
  <p>But that doesn't seem to work since the frame value is incorrect. Ignoring the frame and creating one manually like this seems to work in some cases:</p>
  
  <pre><code>CGRectMake(0.0, 0.0, 480.0, 320.0)
  </code></pre>
  
  <p>But obviously doing manual adjustments like that is less than ideal.</p>
  
  <p>Any ideas?</p>