As the ShouldAutorotateToInterfaceOrientation
is deprecated in iOS 6 and I used that to force a particular view to portrait only, what is the c
Not to be dull here, but would you be so kind to share your subclass? Thank you.
edit: well, I finally did it, the subclass was dead simple to do. I just had to declare the navigationController
in the AppDelegate
as UINavigationControllerSubclass
instead of the default UINavigationController
, then modified your subclass with:
- (BOOL)shouldAutorotate {
return _shouldRotate;
}
so I can set any view I want to rotate or not by calling at viewDidLoad
_navController = (UINavigationController *)self.navigationController;
[_navController setShouldRotate : YES / NO]
Hope this tweak will help others as well, thanks for your tip!
Tip: Make use of
- (NSUInteger)supportedInterfaceOrientations
in your view controllers, so you don't end up by having a portrait desired view in landscape or vice versa.