2012-10-14 209 views
0

應用程序包含5個網頁層次結構,即每個頁面都可以從任何頁面訪問。每個頁面都有縱向和橫向的支持。屏幕旋轉處理ios

因此,當從導航控制器中推送和彈出視圖控制器時,我無法處理旋轉。

任何人都可以建議我需要的方法,可用於實施上述。

謝謝。

回答

1

這可能是iOS 6的問題。除非您告訴它,否則UINavigationController不會自動調用supportedInterfaceOrientations:

查看這個question的回答。

創建一個類似乎是最好的解決方案。

@implementation UINavigationController (iOS6OrientationFix) 

-(BOOL) shouldAutorotate { 
    return [self.topViewController shouldAutorotate]; 
} 

-(NSUInteger) supportedInterfaceOrientations { 
    return [self.topViewController supportedInterfaceOrientations]; 
} 

@end