I have an Universal App that supports all orientations in iPad and only potrait in iPhone / iPod. My code looks somewhat like this:
@implementation UIViewController ( interfaceOrientationHack )
- (void) shouldAutorotateToInterfaceOrientation: ( UIInterfaceOrientation ) toInterfaceOrientation {
if( iPad ) {
return YES;
} else if( toInterfaceOrientation == UIInterfaceOrientationPotrait ) {
return YES;
} else return NO;
}
@end
From one of my controllers, i launch a navigation controller as modal view controller
[ self presentModalViewController: c animated: YES ];
The issue currently is, the modal controller launches correctly in orientation, But when i change my orientation the the modal controller doesn't change its orientation, all the rest of the controllers behave correctly.
Any help will be hugely appreciated. Thanks in advance.