2016-10-25 84 views
0

我有一個應用程序,我已經從項目設置鎖定到肖像模式。也應該旋轉是錯誤等。在模擬器(和設備),當我在iPhone設備上,並旋轉標籤和視圖留在他們的地方。但在iPad上,當我改變景觀時,嘗試重新排列視圖。這是爲什麼發生?謝謝。iPhone和iPad肖像模式應用程序不同的反應

+0

檢查從這裏接受的答案:http://stackoverflow.com/questions/29664441/different-device-orientation-according-到設備-iphone或 - ipad的 –

回答

0

正如馬修說,嘗試這樣的事情

繼@ScarletMerlin的建議,改變了鑰匙在info.plist中,在我看來,因爲我有滿足要求的最佳解決方案(固定的定向類型各種設備)。

下面是我使用的設置的打印屏幕。也許它可以幫助其他類似懷疑的開發者。

Settings in info.plist file

的relavent源代碼如下所示:

<key>UISupportedInterfaceOrientations</key> 
<array> 
    <string>UIInterfaceOrientationPortrait</string> 
</array> 
<key>UISupportedInterfaceOrientations~ipad</key> 
<array> 
    <string>UIInterfaceOrientationLandscapeLeft</string> 
    <string>UIInterfaceOrientationLandscapeRight</string> 
</array> 
相關問題