yes, I hate it too ... all I decided to solve was to do it myself:
- (void)myAutomaticRotation{ if (A.view.frame.size.width > A.view.frame.size.height) { [UIView beginAnimations:@"View Flip" context:nil]; [UIView setAnimationDuration: 0.5f]; [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; self.view.transform = CGAffineTransformIdentity; self.view.transform = CGAffineTransformMakeRotation(M_PI/2); self.view.bounds = CGRectMake(0.0f, 0.0f, 320.0f, 480.0f); A.view.frame = CGRectMake(0,0,320, 480); [UIView commitAnimations]; } }
you can call myAutomaticRotation in the main / super UIViewController when you go to A.view, and in the same place you should use:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { }
where you can check the used view (A, B) and enable landscape mode only for B ...
Luca
source share