![](/img/trans.png)
[英]How to run and deploy Xcode 4.2 project in Xcode 3.2 and iOS 4.2 device
[英]XCode 4.4.1 and iOS 4.2 device orientation issues
我知道這個問題已經被問了很多遍了,但仍然無法解決。
我希望我的應用僅在橫向模式下可用,在我的XCode項目的GUI部分中,我未選擇兩個縱向模式,並且只有兩個橫向模式處於活動狀態。 我檢查了我的plist,在“支持的方向”下只有兩個橫向方向。
但是,當我在運行4.2固件的iPod上運行應用程序時,我可以將應用程序旋轉為縱向模式。
我能做什么?
有人發布了一個完全錯誤的答案:P已被刪除,但確實幫助我找到了正確答案; 我更換:
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
在我的ViewController.m中:
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
因此,感謝海報刪除了他們的帖子! 它幫助我找到正確的答案。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.