gpt4 book ai didi

IOS状态保存: can I display a launch image instead of a snapshot

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:04:39 33 4
gpt4 key购买 nike

问题:使用IOS状态保存时,如何在启动过程中显示自定义启动图像而不是快照

描述:我正在研究IOS状态保存。一切正常,除了每次我在关闭应用程序后重新打开应用程序时,应用程序显示的第一件事是应用程序进入后台时的屏幕快照。我有一个显示用户当前位置的 map View 。我不希望应用程序在启动期间显示旧位置的快照,然后跳转到当前位置。有没有什么方法可以在启动过程中显示自定义启动图像。

最佳答案

请参阅 ignoreSnapshotOnNextApplicationLaunch 的文档:

As part of the state preservation process, UIKit captures your app’s user interface and stores it in an image file. 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.

您必须从用于保存应用状态的代码中调用此方法。

关于IOS状态保存: can I display a launch image instead of a snapshot,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24920876/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com