2012-03-14 35 views
0

在我的應用程序中,我已經在分割視圖的RootViewController中添加了tabBarController。在該縱向模式下工作正常,但其方向不會更改爲橫向模式。當我在rootViewController中添加tabBarController時,方向不會改變。方向不工作當我在分割視圖中添加tabBarController

請建議我這樣做的方式。

回答

2

確保包含在標籤欄控制器中的所有視圖控制器都可以在所有方向上顯示。請參閱Technical Q & A QA1688瞭解更多信息。 https://developer.apple.com/library/ios/#qa/qa1688/_index.html

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    return YES; 
} 
+0

非常感謝,它工作正常,我忘了把這個方法放在一個viewcontroller中。 – Developer 2012-03-14 06:53:03

相關問題