didFinishLaunchingWithOptions 是否发生在以下时间之后:
- applicationWillResignActive
- applicationDidEnterBackground
- applicationWillEnterForeground
还是只在 applicationWillTerminate 之后发生?
那么什么时候 applicationDidBecomeActive 发生呢?谢谢。
最佳答案
来自文档:
It is called after your application has been launched and its main nib file has been loaded. At the time this method is called, your application is in the inactive state. At some point after this method returns, a subsequent delegate method is called to move your application to the active (foreground) state or the background state.
当用户打开您的应用程序时就会发生这种情况。当应用程序准备好接收用户事件时,紧接着是 applicationDidBecomeActive。
当用户按下主页按钮时,将调用以下方法(按此顺序): - applicationWillResignActive - applicationDidEnterBackground
当用户再次打开您的应用且它处于后台时:
- applicationWillEnterForeground
- applicationDidBecomeActive
最后,在 iOS 3.x 或更早版本的设备上,将调用 applicationWillTerminate 而不是 applicationDidEnterBackground。或者使用不支持后台应用程序的设备(例如 3G)。
关于objective-c - didFinishLaunchingWithOptions 是否在某些应用程序 "exits"之后发生?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11334678/