IOS Main function Explained

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.