Ok, here it is. kinda complicated.
Project settings must allow P, LL & LR
Storyboard is a UINavController with a UITableViewController with a button click on the UIViewController panel.
All scenes in the storyboard should be defined as orientation in the simulated indicators. Just saying, because after a while I had everything with different settings after testing.
Must have a class for NavController , TableViewController and the specified UIVController . My application appeared as Single view, then I dragged UITVC and finally introduced UITVC to UINVC. Then I connected the UIVC to the UITVC toolbar item that I dragged through the push segment.
Configure window.rootvc applications on navVC , your top vc hierarchy (remember to set this identifier in the storyboards or, of course, crash):
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil]; UINavigationController *myNavC = (UINavigationController*)[mainStoryboard instantiateViewControllerWithIdentifier:@"MainNav"]; self.window.rootViewController = myNavC;
Tell the big UINVC boss that everyone can spin:
- (BOOL)shouldAutorotate { return self.topViewController.shouldAutorotate; } - (UIInterfaceOrientationMask)supportedInterfaceOrientations { return self.topViewController.supportedInterfaceOrientations; }
Limit the value of tablevc so that it does not rotate:
- (BOOL)shouldAutorotate { return NO; } - (UIInterfaceOrientationMask)supportedInterfaceOrientations { return (UIInterfaceOrientationMaskPortrait); }
Allow rotation of the last UIVC:
- (BOOL)shouldAutorotate { return YES; } - (UIInterfaceOrientationMask)supportedInterfaceOrientations { return (UIInterfaceOrientationMaskAllButUpsideDown); }
marciokoko
source share