如何延迟启动画面

如何延迟启动画面

本文介绍了iOS:如何延迟启动画面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

启动应用时,只要初始化了所有资产,就会删除 LaunchScreen.xib

When launch an app, the LaunchScreen.xib is removed as soon as all the assets are initialized.

我想制作启动屏幕停留至少1秒。

I want to make the launch screen stay for at least 1 sec.

有没有办法实现这个目标?

Is there a way to achieve this?

谢谢!

推荐答案

您可以创建一个使用LaunchScreen故事板的视图控制器,在上显示它(非动画) applicationDidFinishLaunching applicationWillFinishLaunching ,并随时将其解除。

You can create a view controller that uses the LaunchScreen storyboard, present it (not animated) on applicationDidFinishLaunching or applicationWillFinishLaunching, and dismiss it whenever you want.

请记住这一点Apple不鼓励它,因为它给人的印象是你的应用程序需要花费更长的时间才能启动,这会导致用户体验不佳,并可能导致部分用户删除你的应用。

Keep in mind this is discouraged by Apple because it gives the impression that your app takes a lot longer to launch, which is bad user experience and might cause some of your users to delete your app.

这篇关于iOS:如何延迟启动画面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 16:00