我正在使用故事板,我有UITabBarController嵌入UINavigationController。 我推一个视图控制器,然后从这个视图控制器我提出了一个UIViewController MODAL UINavigationController。模态UINavigationController - 我不能停止旋转
问题是,模态视图控制器可以旋转,当我的视图之前的模态视图不能。 如何阻止Modal导航控制器允许任何旋转?
我曾尝试加入:
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
和
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
感谢
类别?使用支持的界面方向。 – Majster
我对其他视图使用其他方向,我只需要限制这个视图。 – Darren
@达伦在这里,你应该去相同... http://stackoverflow.com/questions/13023936/orientation-issue-in-ios-6/13024015#13024015。你可能会得到任何想法相同 – Kamarshad