2010-05-18 79 views
3

我添加了兩個圖像。 Default-Portrait.png和Default-Landscape.png。但每當我開始我的應用程序時,只顯示縱向默認圖像,而與方向無關。ipad default-landscape not displayed

這是怎麼發生的?

回答

13

我有同樣的問題,並通過添加以下到Info.plist文件(在Xcode)解決了這個問題:

<key>UISupportedInterfaceOrientations</key> 
<array> 
    <string>UIInterfaceOrientationPortrait</string> 
    <string>UIInterfaceOrientationPortraitUpsideDown</string> 
    <string>UIInterfaceOrientationLandscapeLeft</string> 
    <string>UIInterfaceOrientationLandscapeRight</string> 
</array> 
+0

讓我再試試這個。 – nishantcm 2010-06-16 12:58:16

+0

非常感謝它的工作 – nishantcm 2010-06-17 08:53:43

+0

天才。這已經殺了我好幾天了! – 2010-09-28 14:21:10

-7

您是否添加了代碼以根據方向換出圖像?我猜測應用程序只是不知道你想要什麼圖片,除非你告訴它。

UIInterfaceOrientation PARAM