在应用程序委托中,我放了一些func,我想让splashscreen等待,直到appdelegate完成它的func。现在,我的应用立即运行初始视图控制器func和app委托func。如何在应用程序委托中的进程结束之前持有splashscreen?
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
}
如何做到这一点?或者是一种关闭初始视图控制器的方法?
请参见[this](http://stackoverflow.com/q/5618163/2231063)和[this](http://stackoverflow.com/q/2459609/2231063)和[this](http:// stackoverflow.com/questions/553336/how-can-i-display-a-splash-screen-for-longer-on-an-iphone) –