Qf--ios Program Operation principle

Source: Internet
Author: User

How iOS Programs work:

The 1> main.m main function is the entry function for all programs.

2> is the Uiapplicationmain function in the main function, which opens an infinite loop to listen to the application.

The Uiapplicationmain function has 4 parameters, the first two are the parameters of the main function, the class name of the 3rd parameter uiapplication, and the 4th is the proxy class name of the application.

2.1> creates an UIApplication instance, one for each application, and one for the entire application.

2.2> creates a UIApplication delegate object, which is the proxy object.

The 3> Appdelegate class is the proxy class for the entire application, which implements the Uiappliactiondelegate protocol, which has several methods for listening to applications.

(delegate events that can be handled include: Application lifecycle events (such as application opening and closing), system events (such as incoming calls), memory warnings, etc.).

Application life cycle method of Appdlegate class and its role

  

Qf--ios Program Operation principle

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.