iOS launcher can load flowcharts:
1. Execute the main function first, and the Uiapplicationmain function will be called inside main
What does the 2.UIApplicationMain function do:
1> Creating UIApplication Objects
2> creating a UIApplication Delegate object-–mjappdelegate
3> Opening a message loop
Every time a supervisor hears the corresponding system event, it will notify Mjappdelegate
4> Create a UIWindow object (inherited from UIView) for the application, set to the Mjappdelegate window property
5> load Info.plist file, read the name of the primary storyboard file
6> load the primary storyboard file, create a white arrow that refers to the Controller object
7> and set the 6th step to create the controller for the UIWindow Rootviewcontroller property (Root Controller)
8> show UIWindow, before the show will add Rootviewcontroller view to UIWindow above (in this step will create the controller's view)
[Window AddSubview:window.rootViewControler.view];
Entering the main function, the Uiapplicationmain method is executed in the main function of MAIN.M, which is the entry point of the IOS program!
int uiapplicationmain (int argc, char argv[], nsstring principalclassname, NSString *delegateclassname)
ARGC, Argv:iso C standard main function parameters, directly passed to the Uiapplicationmain for related processing can be
Principalclassname: Specifies the application class, which must be uiapplication (or subclass). If nil, use the UIApplication class as the default value
Delegateclassname: Specifies the proxy class for the application class that must comply with the Uiapplicationdelegate protocol
This function creates a UIApplication object based on Principalclassname and creates a delegate object based on Delegateclassname. and assigns the delegate object to the delegate property in the UIApplication object
The Luiapplication object sends a different message to the delegate object in turn, and then builds the application's main Runloop (the event loop) to handle the event (the application of the delegate object is called first: Didfinishlaunchingwithoptions:)
This function returns when the program exits normally. If the process is to be forced to kill by the system, it is usually terminated before the function can return to the process.
Full boot process for iOS