What does a view controller do for me when orientation changed?
<p>A simple iphone program generated by project template View-based Application, with several buttons, and I added following code:</p>

<pre><code>- (void) showInfo: (UIView *) view {
    NSLog(@"view bounds  %6.2f %6.2f %6.2f %6.2f", view.bounds.origin.x, view.bounds.origin.y, view.bounds.size.width, view.bounds.size.height);
    NSLog(@"view frame   %6.2f %6.2f %6.2f %6.2f", view.frame.origin.x, view.frame.origin.y, view.frame.size.width, view.frame.size.height);
    NSLog(@"view center  %6.2f %6.2f", view.center.x, view.center.y);
}

- (BOOL)shouldAutorotateToInterfaceOrientation: UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

- (void)willRotateToInterfaceOrientation: (UIInterfaceOrientation) toInterfaceOrientation duration:(NSTimeInterval) duration {
    switch(toInterfaceOrientation) {
        case UIInterfaceOrientationPortrait:
            [self showInfo: self.view];
            break;
        case UIInterfaceOrientationLandscapeLeft:
            [self showInfo: self.view];
            break;
        case UIInterfaceOrientationLandscapeRight:
            [self showInfo: self.view];
            break;
    }
}

- (void) didRotateFromInterfaceOrientation: (UIInterfaceOrientation) fromInterfaceOrientation {
    switch(fromInterfaceOrientation) {
        case UIInterfaceOrientationPortrait:
            [self showInfo: self.view];
            break;
        case UIInterfaceOrientationLandscapeLeft:
            [self showInfo: self.view];
            break;
        case UIInterfaceOrientationLandscapeRight:
            [self showInfo: self.view];
            break;
    }
}
</code></pre>

<p>Launch simulator in Portrait, change to landscape right. I can get:</p>

<p>view bounds    0.00   0.00 320.00 460.00<br>
view frame     0.00  20.00 320.00 460.00<br>
view center  160.00 250.00<br>
In portrait, view's size is 320x460, and it's origin is (0,20) because of status bar.</p>

<p>view bounds    0.00   0.00 480.00 300.00<br>
view frame     0.00   0.00 300.00 480.00<br>
view center  150.00 240.00<br>
In landscape right, bounds' size is changed to 480x300, However, the origin of the frame is (0, 0). And the size of frame is different from bounds.</p>

<p>In my head, I imagine that these coordinates are like following pictures:</p>

<p><img src="http://lh4.ggpht.com/_fXGnFRoJLvA/S2D_GZGGp0I/AAAAAAAAGH8/JuQBvJCnASM/s400/%E5%9C%96%E7%89%87%201.png" alt="Portrait"></p>

<p><img src="http://lh5.ggpht.com/_fXGnFRoJLvA/S2D_GfJbg8I/AAAAAAAAGIA/zMqMMXWWs_M/s400/%E5%9C%96%E7%89%87%202.png" alt="Portrait"></p>

<p>My question is: in landscape right, it seems that the frame's origin points to one location while bounds' origin points to a different one. So I think somewhere in a view controller some rotation happens. Where is it and what does it do?</p>

<p>Thanks for reading this long and not-so-clear question. :) </p>
