2013-03-14 77 views
11

我將項目摘要> iPhone/iPod部署信息>支持的界面方向設置爲僅肖像模式。只有iPad定位肖像

這適用於所有的模擬器,iPad(iOS 5.1)和iPhone(iOS 6.1)。

但是在我的iPad上從5.1到6.1.2然後

應用程序在iPad上成爲景觀的應用程序(左+右)模式下運行升級的iOS啓動。

我該如何解決這個問題?

回答

23

嘗試將YourApp-Info.plist文件在支持文件,並確保適當的方向被設置爲兩個Supported interface orientationsSupported interface orientations (iPad)

+0

將肖像添加到支持的界面方向後。我得到了一個錯誤 'UIApplicationInvalidInterfaceOrientation',原因:'支持的方向與應用程序沒有共同的方向,並且shouldAutorotate返回YES' – user1047504 2013-03-14 09:18:35

+0

沒錯。謝謝。 – user1047504 2013-03-14 09:21:27

+0

猜測你錯過了' - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation'?但你得到它的工作似乎:)高興地幫助 – 2013-03-14 13:51:20

4

添加UISupportedInterfaceOrientation到您的info.plist,爲每個方向的設置你支持。

+0

這是正確的。謝謝。 – user1047504 2013-03-14 09:24:30