I have some insights in my application that I do not want to maintain orientation. In didFinishLaunchingWithOptions I add navigation:
... UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:self.viewController]; self.window.rootViewController = nav; [self.window makeKeyAndVisible]; ...
In every ViewController I have a UITabBar (I don't know if this is important).
In the first view of the controller, I add:
-(BOOL)shouldAutorotate { return NO; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; }
supportedInterfaceOrientations is called when the view loads, but shouldAutorotate does not call when I rotate the device.
What am I missing here?
ios objective-c iphone ios6 uiinterfaceorientation
1110 October 21 2018-12-12T00: 00Z
source share