简体   繁体   English

如何让应用程序只在从头开始启动时加载Default.png?

[英]How to let the app load with Default.png only when it is launched from scratch?

Example: My Default.png image shows the start screen of my app with an empty interface. 示例:My Default.png图像显示我的应用程序的开始屏幕,其界面为空。 When the app is launched from scratch the first time, this is cool. 当应用程序第一次从头开始启动时,这很酷。 It appears like it started quickly. 它似乎很快就开始了。 But when the user quits it and the app just goes to background, and then the user opens it, this sucks. 但是当用户退出它并且应用程序只是进入后台,然后用户打开它时,这很糟糕。 Then I always end up with a wrong "snapshot" as launch image and my app then looks completely different after launch because it is like it was left the last time. 然后我总是以错误的“快照”作为启动图像,然后我的应用程序在启动后看起来完全不同,因为它就像它最后一次离开。

I would have to disable the Default.png when my app just goes to background, or I would have to enable it when it gets really terminated. 当我的应用程序转到后台时,我必须禁用Default.png,否则当它真正终止时我必须启用它。 Any way to do this? 有什么办法吗?

It sounds to me like your app isn't being suspended. 听起来我的应用程序没有被暂停。 Every app that I've used that supports fast-app switching hasn't shown its default png when I open it after suspending it. 我使用的每个支持快速应用切换的应用都没有在暂停后打开它时显示默认的png。

Are you sure your app is supporting fast-app switching and that it is being suspended? 你确定你的应用程序支持快速应用程序切换并且它正在暂停吗?

Just updating my answer for some clarity that was revealed in the comments: 只是更新我的答案,以便在评论中显示一些清晰度:

In order to take advantage of fast-app switching, the following conditions need to be met: 为了利用快速app切换,需要满足以下条件:

  • App needs to be compiled against the 4.0 SDK 应用程序需要针对4.0 SDK进行编译
  • App needs to be running on a multitasking-capable device such as: 应用程序需要在支持多任务处理的设备上运行,例如:
    • iPhone 4 iPhone 4
    • iPhone 3GS iPhone 3GS
    • iPod touch 3rd Generation iPod touch第三代
  • info.plist must not contain the UIApplicationExitsOnSuspend key. info.plist 不得包含UIApplicationExitsOnSuspend键。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM