从LaunchScreen看到Main.Storyboard中的viewController? [英] Segue from LaunchScreen to a viewController in Main.Storyboard?

查看:270
本文介绍了从LaunchScreen看到Main.Storyboard中的viewController?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在LaunchScreen中有一些我想要做的逻辑,如果检查没问题,我想要转到viewController,如果不是,我想要转向另一个,这可能吗?

I got some logic I want to do in my LaunchScreen, and if the check is alright, I want to segue to a viewController and if not I want to segue to another, is that possible?

推荐答案


我在LaunchScreen中想要做一些逻辑

I got some logic I want to do in my LaunchScreen

现在我理解了这个问题,我可以回答:不要。稍后做你耗时的逻辑。您的工作是快速启动 。您需要退出 applicationDidFinishLaunchingWithOptions ,退出 viewDidLoad ,然后启动

Now that I understand the question, I can answer it: don't. Do your time-consuming logic later. Your job is to launch fast. You need to get out of applicationDidFinishLaunchingWithOptions, get out of viewDidLoad, and launch.

你在那一点展示的是由你决定的;如果你有耗时的东西(在你的情况下,这听起来像你正在联网或做一些其他的东西需要时间,你加载一个表的数据源),你想要显示一个特殊的视图控制器,涵盖时间有旋转活动视图或其他东西,很好。但在实际发布期间不是时候做到这一点。

What you show at that point is up to you; if you have time-consuming stuff (in your case, it sounds like you're networking or doing something else that takes time while you load up the data source for a table) and you want to show a special view controller that covers the time with a spinning activity view or something, fine. But during actual launch is not the time to do that.

这篇关于从LaunchScreen看到Main.Storyboard中的viewController?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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