Sorry for this many bumps but it's important and others will need this, too:
It didn't compile without this:
Code:
#define degreesToRadian(x) (M_PI * x / 180.0)
Only rotate a single view:
Code:
- (void)viewWillAppear:(BOOL)animated {
_originalTransform = [self.view transform];
_originalBounds = [self.view bounds];
_originalCenter = [self.view center];
CGAffineTransform landscapeTransform = CGAffineTransformMakeRotation(degreesToRadian(90));
landscapeTransform = CGAffineTransformTranslate (landscapeTransform, +80.0, +100.0);
[self.view setTransform:landscapeTransform];
self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.view.autoresizesSubviews = YES;
self.view.bounds = CGRectMake(0.0, 0.0, 480.0, 320.0);
self.view.center = CGPointMake (240.0, 160.0);
[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeRight;
}
- (void) viewWillDisappear:(BOOL)animated {
[self.view setTransform:_originalTransform];
[self.view setBounds:_originalBounds];
[self.view setCenter:_originalCenter];
[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationPortrait;
}
It's working great but I get a problem with the original navigationbar:

Anyone else encountering the same problem?
regards