iOS应用程序启动图像后杀死 [英] iOS App Launch Image After a Kill

查看:136
本文介绍了iOS应用程序启动图像后杀死的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我杀死我的iPhone应用程序并重新启动它时,我会看到应用程序之前状态的图像,而不是启动图像。如何强制iOS始终显示启动图像?

When I kill my iPhone app and relaunch it I have an image of the app's previous state instead of the launch image. How can I force iOS to always show the launch image?

推荐答案

要强制iOS启动带有默认图像的应用,请致电 [[UIApplication sharedApplication] ignoreSnapshotOnNextApplicationLaunch]; 您实施状态保存的位置。

To force iOS to launch an app with its default image, call [[UIApplication sharedApplication] ignoreSnapshotOnNextApplicationLaunch]; where you implement state preservation.

来自文档


当你的应用程序重新启动是
,系统会显示此快照图像以代替您的
应用程序的默认启动图像,以保留您的应用仍为
仍在运行的概念。如果您觉得快照无法在重新启动应用程序时正确反映应用程序用户界面的
,则可以调用
此方法以防止拍摄快照图像。如果您是
,UIKit会使用您应用的默认启动图片。

When your app is relaunched, the system displays this snapshot image in place of your app’s default launch image to preserve the notion that your app was still running. If you feel that the snapshot cannot correctly reflect your app’s user interface when your app is relaunched, you can call this method to prevent that snapshot image from being taken. If you do, UIKit uses your app’s default launch image instead.

另请参阅这个问题了解更多详情。

Also look at this question for more details.

这篇关于iOS应用程序启动图像后杀死的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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