Is there any way that we can Forcefully change app orientation from portrait to landscape while navigating ?
I have a requirement that while pushing controller from
In - (void)viewWillAppear:(BOOL)animated
say:
//this is to force the application to re-evaluate device orientation
//comment the last lines and see
//cannot use [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeLeft];
//as "setOrientation" is a private method, and we risk to be kicked out by Apple
UIViewController *c = [[[UIViewController alloc]init] autorelease];
[self presentModalViewController:c animated:NO];
[self dismissModalViewControllerAnimated:NO];
... but first, in your xib, set your view's orientation to the desired one