开发者

Wrong iPhone launch image displayed when iPhone app is launched on iPad

开发者 https://www.devze.com 2023-03-28 20:01 出处:网络
I have developed a straight iPhone/iPod Touch app. A launch image is implemented for Retina displays as well as the lower resolution of the former generation devices.

I have developed a straight iPhone/iPod Touch app. A launch image is implemented for Retina displays as well as the lower resolution of the former generation devices. Those images are displayed properly on the iPhone simulator as well as on several iPhone an iPod Touch devices.

However, since some days, when launched on an iPad (1) or iPad simulator one of the other images within the app is shown.

Apparently the image that is displayed wrongly, is one of two amongst ca. 70 images within the app. Those two images happen to be either 1. the first image in my xcode project groups hierarchy. -or- 2. the first image in my project in alphabetical order.

I did not yet find a pattern of when 1. or 2. happens, so when the first image in the project's hierarchy of groups is taken or when the first in alphabetical order is taken. But it seems to be one of these two files only.

An开发者_开发百科y idea what I probably did wrong so that a wrong image is picked as launch image of this iPhone-only app whenever it is launched on an iPad?

Thanks in advance.

Cheers Hermann


Try inserting an image named Default.png into Xcode. That's all, just drag it in. Xcode recognizes any picture named Default.png as the loading image. That should make it work.


To expand a little on Jack's answer - you can indeed use an image named Default.png which will automatically be used as a launch image for your app.

However,you can also customise the launch image for particular hardware and device orientations by using images of a particular size and name - for example, a 768x1004 pixel image named Default-Portrait~ipad.png added to your project will be automatically used as the launch image when you launch the app on an iPad in portrait orientation.

The use of these customised images is highly recommended, as it allows the launch image to be sized appropriately for the different shapes of screen (i.e. iPhone and iPad), and allows high resolution launch images to be used on Retina display devices.

For a list of these sizes and image names, see this page. The items of interest are the ones beginning with "Default"


All iPhone apps have a splash screen, or what Apple refers to as a “launch image”. It is the screen that is displayed immediately after you press your app’s icon on the home screen, while the app icons are sweeping away and your app is zooming into view.

Some apps opt not to display a splash screen and go for a black screen, which is the default behaviour when you create an app. Others display a wireframe of the app’s interface in order to look like it is loading faster. See Apple’s native apps such as Clock and Camera for good examples of this. The most common use of the splash screen (especially in games) is to present a company or game logo, as we do in Addicus:

Apple has made it so easy to set your splash screen that you don’t even need a single line of code to do it. Why, you don’t even need to change a setting. Here’s how to set your splash screen it in just 2 steps:

  1. Add a file to your project’s Resource folder called Default.png.

  2. There is no step 2. Take this time to reflect on how good life is.

And that’s it. Run your app and your splash screen will zoom into glorious view.

A couple of things to watch out for when working with splash screens:

Whatever image you give it will be scaled to fill the 320×480 resolution of the iPhone, so ideally you would use a 320×480-sized image.

If your iPhone app is running in landscape mode, you need to rotate the splash screen you use. For example, our splash screen is rotated 90 degrees to the right in the above image.

  • See more at: http://getsetgames.com/tag/launch-image/#sthash.GEXwuzsf.dpuf
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号