I am using MSNavigationPaneViewController
from here and have rotation sort of working.
I\'ve overridden the rotation methods in my root UINavigationContro
preferredInterfaceOrientationForPresentation
will not be called on controllers within a UINavigationController
.
You are going to have to subclass UINavigationController
and then implement this feature yourself. You'd simply want to delegated to topViewController
.
For reference check out: http://code.shabz.co/post/32051014482/ios-6-supportedorientations-with-uinavigationcontroller
I also found this implementation of a UINavigationController
subclass: https://gist.github.com/3842178
You can trick the window into re-valuating its supported interface orientations by resetting its rootViewController.
UIApplication *app = [UIApplication sharedApplication];
UIWindow *window = [[app windows] objectAtIndex:0];
UIViewController *root = window.rootViewController;
window.rootViewController = nil;
window.rootViewController = root;
You'd need to make sure that when this code executes, -supportedInterfaceOrientations of the root view controller returns the proper mask (corresponding to how you want to force the orientation).
Be aware, this hack can cause a quick flash on the screen and glitch any ongoing animations.