In my mainwindow.xib I have a navigationcontroller. On top of (as a sub item) I have another viewcontroller(homeviewcontroller).
In the nib I have set the window\
You need to subclass UINavigationController and override supportedInterfaceOrientations there.
Do it programmatically at runtime? (In your -applicationDidFinishLaunching:
delegate method)
To elaborate on @phix23's answer, I wrote this tiny UINavigationController subclass
@implementation MyNavigationController
- (NSUInteger) supportedInterfaceOrientations
{
return [[self topViewController] supportedInterfaceOrientations];
}
@end
From my understanding of the docs mentioned in his comment, this should be the default behavior. But somehow this works for me, while without it, it doesn't