ipad default-landscape not displaying

怎甘沉沦 提交于 2019-12-07 16:36:28

问题


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?


回答1:


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>



回答2:


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



来源:https://stackoverflow.com/questions/2856572/ipad-default-landscape-not-displaying

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!