intMainintargcChar*argv[]) {@autoreleasepool {//four parameters mainly explain the following two parameters /*The third parameter: UIApplication or the class name of its subclass, if nil is the default is uiapplication fourth parameter: UIApplication the name of the proxy class NSSTRINGFR Omclass: Converting a class name to a string*/ returnUiapplicationmain (argc, argv, Nil, nsstringfromclass ([appdelegateclass])); //the principle of Uiapplicationmain /*1. Create the UIApplication object 2 based on the class name passed in from the third parameter. Create a proxy object for uiapplication based on the fourth parameter and set proxy 3 to uiapplication. Open a main operation Loop (Runloop) handles the event, keeping the program running until it exits 4. Load the Info.plist file to see if the nib file for main is configured and load it if specified*/ }}
IOS Main function Explained