2018-08-07 App Launch Sequence

2018-08-07  本文已影响0人  SeagullWu

Launching an app involves a complex sequence of steps, most of which UIKit handles automatically. During the launch sequence, UIKit calls methods of your app delegate so that you can perform custom tasks. illustrates the sequence of steps that occur from the time the app is launched until it is considered initialized.

Figure 1 

The app launch and initialization sequence

The app is launched, either explicitly by the user or implicitly by the system.

The Xcode-provided main function calls UIKit's UIApplicationMain function.

The UIApplicationMain function creates the UIApplication object and your app delegate.

UIKit loads your app's default interface from the main storyboard or nib file.

UIKit calls your app delegate's application:willFinishLaunchingWithOptions:method.

UIKit performs state restoration, which calls additional methods of your app delegate and view controllers.

UIKit calls your app delegate's application:didFinishLaunchingWithOptions:method .

From: https://developer.apple.com/documentation/uikit/core_app/managing_your_app_s_life_cycle/responding_to_the_launch_of_your_app/about_the_app_launch_sequence?language=objc

上一篇下一篇

猜你喜欢

热点阅读