2011-05-26 31 views

回答

6

確保視圖的方向設置爲風景:
enter image description here

+1

我已經這樣做了,但它仍然顯示在肖像 – Marcus 2011-05-26 00:17:26

+0

當你真的運行應用程序或當你在Xcode中查看它? – 2011-05-26 01:19:44

+0

那麼Marcus有沒有解決方案? – ElizaS 2013-11-07 13:22:43

3

確保該函數返回YES或(interfaceOrientation == UIInterfaceOrientationLandscape)

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    return YES; 
    // Or you can use the following return statement: 
    //return (interfaceOrientation == UIInterfaceOrientationLandscape); 
} 

在你的開發-的info.plist文件放在資源文件夾中,會出現「支持界面定位」的選項,根據需要進行設置。

相關問題