Ios 如何保持splashscreen,直到应用程序内委托过程结束?
在appdelegate中,我放置了一些函数,我希望splashscreen等待appdelegate完成其函数。现在,我的应用程序立即同时运行初始视图控制器func和应用程序委托funcIos 如何保持splashscreen,直到应用程序内委托过程结束?,ios,swift,splash-screen,appdelegate,Ios,Swift,Splash Screen,Appdelegate,在appdelegate中,我放置了一些函数,我希望splashscreen等待appdelegate完成其函数。现在,我的应用程序立即同时运行初始视图控制器func和应用程序委托func func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for cu
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
let email = NSUserDefaults.standardUserDefaults().stringForKey("userEmail")
if let email = email {
reLogin()
}else{
buildNavigationDrawer()
}// I want this execute first and run the initial view controller's after
return true
}
如何做到这一点?或者,这是关闭初始视图控制器的一种方式吗?在应用程序代理完成处理之前,无法将启动屏幕保持在屏幕上。但是,您可以使应用程序的第一个视图与发布图像匹配。然后,当您准备好显示内容时,您可以关闭第一个视图。您不能在启动屏幕上停留超过预期的时间。您可以在启动屏幕后显示类似的视图控制器,但前提是您管理大量数据并且需要加载屏幕。《苹果应用商店指南》也禁止手持启动屏幕。请参阅并感谢您的建议!尽管“匹配发布图像”这件事