iOS Program # startup process

Source: Internet
Author: User

[App app]

Chinese name: default

Foreign Name: Default

Pinyin: Quēshěng

Explanation: System default State

Full Name: Default state

--------------

1. Program Start sequence

1> MAIN.M procedure Entrance;

2>main function in Uiapplicationmain (), create an App object, and specify this app agent, detect the execution of the program, turn on the "event loop??" ; The event received by the handler;

3>uiapplicationdelegate method execution;

4> loading window;

5> specifying the root view Controller

(Root Viewcontroller)

2, UIApplication

In the iphone app, use an example of uiapplication (singleton, easy to use).

Main: Handling User events, window display, to the app application "designated agent"-to monitor the operation of the program.

3. main.m Main function

int main (int argc, char *argv[]) {

@autoreleasepool {

    Return Uiapplicationmain (argc, argv, Nil, Nsstringfromclass ([Appdelegate class]));

}

}

Main does only three things:

    1. Create Autoreleasepool auto-free pool

    2. Call the Uiapplicationmain function

    3. Using the auto-release pool

4, automatic release of the pool Autoreleasepool

A mechanism for "managing memory" that delays the release of objects created in a code block with certain functionality.

5, Uiapplicationmain

6, Uiapplicationdelegate

7, UIWindow



================================

Ps:

[one sentence per day]

"The whole world will make way for him if he knows where he's going,"--north face

[An English song every day]

"Nothing ' s Gonna change my love for You"--Westlife

================================

|--> Copyright (c) Bing Ma.

|--> GitHub RUL: https://github.com/SpongeBob-GitHub

iOS Program # startup process

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.