This is my solution, based on Ed Marty on this page and Simon here - http://simonwoodside.com/weblog/2009/2/27/iphone_programming_how_to_switch/
Within the preceding view, call this from your button or table cell selected method
- (void) launchLandscape
{
LandscapeViewController *controller = [[LandscapeViewController alloc] initWithNibName:@"LandscapeViewControllerView" bundle:nil];
[self.navigationController setNavigationBarHidden:YES];
controller.hidesBottomBarWhenPushed = YES;
[[self navigationController] pushViewController:controller animated:NO];
[controller release];
}
And then within the landscape view
- (void)viewWillAppear:(BOOL)animated {
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeRight;
CGAffineTransform landscapeTransform = CGAffineTransformMakeRotation( degreesToRadian(90) );
landscapeTransform = CGAffineTransformTranslate( landscapeTransform, +90.0, +90.0 );
[self.view setTransform:landscapeTransform];
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];
}
-(IBAction)backButton:(id)sender
{
[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationPortrait;
[[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
[self.navigationController setNavigationBarHidden:NO];
[self.navigationController popViewControllerAnimated:NO];
}
It's a bit 'sudden'. You can't really put animation on any of it because it looks too glitchy. I guess it could be improved by pushing a intermediate view with animation (a plain black view) and then automatically doing the above stuff to go to the final landscape.