views:

751

answers:

2

Hi,

I have added both images. Default-Portrait.png and Default-Landscape.png. But whenever I start my app, only the portrait default image is displayed irrespective of the orientation.

Why is this happening?

A: 

Did you add code to swap out the images based on orientation? I am guessing the app just is not going to know what picture you want unless you tell it.

UIInterfaceOrientation param

Josh Harris
+3  A: 

I had the same problem and solved it by adding the following to the Info.plist file (from Xcode):

<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
Eran Berkovitz
Let me try this once.
nishantcm
Thanks much it worked
nishantcm
Genius. This has been killing me for days!
Nick Cartwright