根据启动方向将iOS初始图像定向到横向/纵向 [英] Orienting iOS splash image to landscape/portrait according to launch orientation

查看:201
本文介绍了根据启动方向将iOS初始图像定向到横向/纵向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以纵向或横向启动的应用程序.我希望Default.png文件(在应用启动时显示的初始图像)以正确的方向显示图像,所以我希望我需要使用两个不同的图像(不同尺寸).但是,我不知道如何使应用程序根据其启动方向选择要使用的图像.这可能吗?有什么办法可以知道应用程序的启动方向(在显示初始画面之前)然后选择正确的图像,还是只需要使图像以一种方向侧向旋转或放置图像就可以解决?在90度旋转时是无法区分的?

I have an app that can launch in portrait or landscape. I'd like the Default.png file (the splash image that appears when the app launches) to show the image in the correct orientation so I expect I'd need to use two different images (different dimensions). I don't know how to make the app pick which image to use based on its launching orientation, however. Is this possible? Is there any way to know what orientation the app is launching in (before the splash is shown) and then pick the correct image, or do I simply have to settle with either having the image rotated sideways in one of the orientations or having an image that is indistinguishable at 90 degree rotations?

推荐答案

您可以为您的启动图像专门命名以该方向命名,并且每个图像都将以该方向显示

You can name your start up images specifically for the orientation and each one will be displayed for that orientation

  1. Default-Portrait.png
  2. Default-PortraitUpsideDown.png
  3. Default-Landscape.png
  4. Default-LandscapeLeft.png
  5. Default-LandscapeRight.png
  1. Default-Portrait.png
  2. Default-PortraitUpsideDown.png
  3. Default-Landscape.png
  4. Default-LandscapeLeft.png
  5. Default-LandscapeRight.png

这篇关于根据启动方向将iOS初始图像定向到横向/纵向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆