iPhone 在闪屏期间睡眠中断后返回黑屏

发布于 2024-12-18 17:11:26 字数 330 浏览 1 评论 0原文

我遇到了一个似乎与操作系统相关的奇怪错误:如果我在显示操作系统控制的初始屏幕 Default.png 时对设备进行睡眠中断,然后立即唤醒设备,则会出现黑色屏幕直到调用 applicationDidFinishLaunching: 并且操作系统将控制权传递给我的应用程序。

如果唤醒设备后,Default.png 仍能正常显示,那就太好了。我输入了一些日志来查看中断处理程序(applicationWillResignActive: 等)何时被调用,但它们从来没有这样做 - 我认为中断发生得太快了。

关于如何避免返回黑屏有什么想法吗?

提前致谢!

I've got a strange bug going on that seems to be OS related : If I give a sleep interrupt to my device while the OS controlled splash screen, Default.png, is displayed, and then immediately wake the device, I get a black screen until applicationDidFinishLaunching: is called and the OS passes control to my app.

It would be nice if upon waking the device, Default.png still displayed properly. I put some logs in to see when the interrupt handlers (applicationWillResignActive: etc.) get called, but they never do - I think the interrupt is happening too soon.

Any ideas on how to avoid returning to a black screen?

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

抽个烟儿 2024-12-25 17:11:26

您无法控制启动屏幕的显示时间。 Default.png 文件将在应用程序设置时显示,但一旦应用程序准备好启动就会消失。

如果您需要更多时间来完成加载,您应该创建另一个看起来像您可以控制的启动屏幕的视图。

只要知道苹果在如何使用闪屏方面就很棘手。他们认为你的应用无论如何都不应该有这样的东西。因此,请注意您在空白/启动屏幕上停留的时间。显示进度视图或活动指示器,让用户知道您没有崩溃并且仍在工作。

You don't have any control over the splash screen how long it will display. The Default.png file will show while the app is being set up, but will disappear as soon as the app is ready to launch.

If you need more time to finish loading, you should create another view that looks like the splash screen that you have control over.

Just know that Apple is prickly when it comes to how the splash screen is used. They are of the opinion that your app shouldn't have one anyway. So be careful how long you sit on an empty/splash screen. Display a progress view or activity indicator to let the user know that you haven't crashed and are still working.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文