iPhone Splash:“Default.png”在模拟器上显示但不在iPhone上显示 [英] iPhone Splash: "Default.png" displays on simulator but not the iPhone

查看:153
本文介绍了iPhone Splash:“Default.png”在模拟器上显示但不在iPhone上显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图给我的iPhone一个闪屏。

I'm trying to give my iPhone a splash screen.

我在我的资源组中放置了 Default.png 。当我运行模拟器时,它会按预期显示,但是当我将应用程序安装到iPhone时,不会显示启动画面。

I've placed Default.png in my resources group. When I run the simulator it is displayed as expected, however when I install my application to the iPhone, no splash screen is displayed.

有谁知道原因/解决方案是什么这个问题是什么?

Does anyone know what the cause/solution to this problem is?

谢谢!

推荐答案

确保你的图像为480x320像素,并放置在顶层的应用程序中。框架将显示此图像,直到您的初始视图已加载并准备好显示。

Make sure your image is 480x320 pixels, and placed in your application at the top level. The frameworks will display this image until your initial view has loaded and is ready for display.

如果您看到黑色背景,那么有些不对劲,但如果您是只要看到你的应用程序的初始视图,然后很高兴你已经设法启动你的应用程序并准备好及时使用。

If you are seeing a black background then there is something amiss, however if you are just seeing your app's initial view then be happy you have managed to launch your app and have it ready for use in good time.

如果你真的,真的希望用户在显示初始视图之前,通过在应用中添加延迟来查看启动画面然后减慢启动速度

If you really, really want the user to to see your splash screen then slow down your launch by adding a delay into your app before you present the initial view

文件名必须为Default.png(带有资本) d)。此外,还要对整个项目进行清理/重建,以确保项目中包含最新版本的文件。检查文件系统上的文件名,它可能在XCode中以不同方式显示。

The file name must be Default.png (with a capital D). Also, do a clean/rebuild of the entire project to ensure the most recent version of the file is being included in the project. Check the filename on the filesystem, it may display differently in XCode.

这篇关于iPhone Splash:“Default.png”在模拟器上显示但不在iPhone上显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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