I am using storyboards and I have a UINavigationController embedded in a UITabBarController. i push a view controller then from this view controller I present a MODAL UINavigationController with a UIViewController.
The problem is, the modal view controller can rotate when all my view previous to the modal view can't. How do I stop the Modal nav controller allowing any rotation?
I have tried adding:
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
and
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
Thanks