I am creating an app that is exclusively in portrait mode, except in one view. It switches to landscape fine, but when using the "back" button to go to the previous view, which should be displayed in portrait, it now is displayed in landscape.
How can I force the UIViewController to be presented in portrait even if the previous controller was landscape?
The following code is no longer working as it was deprecated...
UIViewController *c = [[UIViewController alloc]init];
[self presentModalViewController:c animated:NO];
[self dismissModalViewControllerAnimated:NO];