2010-10-06 126 views
1

我正在製作基於TabBar的通用應用程序。我添加了一些額外的選項卡,並將viewController更改爲navigationController。現在,當我試圖將視圖從縱向旋轉到橫向時,它將旋轉內部視圖,但tabBar不旋轉,並且它停留在縱向模式底部的相同位置,其中每個其他UI都正確旋轉。從縱向到橫向的TabBar旋轉

+0

在這個問題的答案是[這裏] [1] [1]:http://stackoverflow.com/questions/4242849/uitabbar-orientation-problem – agarcian 2012-07-08 19:06:33

回答

0

確保控制器不支持旋轉(分別爲其所有者)將覆蓋shouldAutorotateToInterfaceOrientation併爲所有方向返回YES。

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 
#pragma unused(interfaceOrientation) 
    // Overriden to allow any orientation. 
    return YES; 
} 

http://developer.apple.com/library/ios/documentation/uikit/reference/UIViewController_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006926-CH3-SW23

+0

我已經檢查過所有東西,但仍然有相同的結果。 – user467564 2010-10-06 06:42:45

相關問題