我正在使用故事板,我有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