2013-03-11 57 views
0

我試圖讓我的視圖控制器旋轉,但我無法讓它工作。我添加了這兩種方法:shouldAutorotate返回YES,但不發生旋轉

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 
{ 
    return YES; //iOS 5 
} 

- (BOOL)shouldAutorotate 
{ 
    return YES; //iOS 6 
} 

而第二個(使用iOS6的IM)確實越來越調用,但沒有旋轉發生。爲什麼是這樣?

謝謝!

+0

iOS6的默認可以rotate.Delete shouldAutorotate – Alex 2013-03-11 18:57:07

回答

0

也實現了這對iOS6的:

- (NSUInteger) supportedInterfaceOrientations 
{ 
    return UIInterfaceOrientationMaskAll; 
} 

本帖超好用對我支持的iOS5和6: auto-rotation in iOS5/6?

+0

遐我已經得到了在那裏以及...即時通訊閱讀該鏈接,看看它是否導致我的任何地方。 – 2013-03-11 18:41:39

相關問題