I am trying to go from a viewcontroller that supports landscape (while in landscape mode), to one that explicitly doesn\'t (and shouldn\'t) support landscape. I\'m doing thi
I found a way to force portrait. It's a bit a hack, but here it is. In the -(void)viewDidLoad of the viewController that you want to force portrait for do the following:
UIViewController *viewController = [[UIViewController alloc] init];
[self presentModalViewController:viewController animated:NO];
[self dismissModalViewControllerAnimated:NO];
[viewController release];
This basically forces portrait, by presenting a controller (which only supports portrait by default).