Is applicationWillResignActive ever called before didFinishLaunchingWithOptions ends?

后端 未结 3 2016
日久生厌
日久生厌 2020-12-29 17:06

Can a scenario happen where applicationWillResignActive: will be called before application:didFinishLaunchingWithOptions: ends?

3条回答
  •  清酒与你
    2020-12-29 17:28

    Apple's iOS App Programming Guide in the "App States and Multitasking" Section, indicates applicationWillResignActive: is called as part of your application's handling of events through processing the run loop, which only begins after application:didFinishLaunchingWithOptions: has finished.

    Furthermore, application lifecycle events always happen on the main thread, so it wouldn't be possible for one of them to pre-empt the other or run in parallel with each other.

提交回复
热议问题