2012-11-27 111 views
0

xcode:4.5.2iPhone風景問題

我想在iPad中創建一個應用程序;

我設置我的info.plist如下:

初始界面方向:橫向(左home鍵)

當我開始我的應用程序,定向設備有風景模式,但我認爲不旋轉這種行爲。

我不知道它是什麼,誰可以幫我

+0

您是否製作在橫向模式XIB? – Murali

+0

1.您是在實際設備還是模擬器中運行它? 2.你打掃和建造了嗎? 3.你在視圖控制器中處理了旋轉嗎? – Raptor

+0

是的,我都完成了,我用「故事板」來創建 –

回答

0

是您實現這些下面的方法。

-(BOOL)shouldAutomaticallyForwardAppearanceMethods{ 
     // This method is called to determine whether to 
     // automatically forward appearance-related containment 
     // callbacks to child view controllers. 
     return YES; 

    } 
    -(BOOL)shouldAutomaticallyForwardRotationMethods{ 
     // This method is called to determine whether to 
     // automatically forward rotation-related containment 
     // callbacks to child view controllers. 
     return YES; 
    } 
0

iOS6的你必須使用這種方法vieworientation

-(BOOL)shouldAutorotate 
{ 
    return YES; 
} 
-(NSUInteger)supportedInterfaceOrientations 
{ 
    return UIInterfaceOrientationMaskAll; 
} 

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation 
{ 
    return UIInterfaceOrientationMaskAll; 
}