在應用程序委託中,我放了一些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) –