An explanation of the iOS running process of OC Learning Summary

Source: Internet
Author: User

1) iOS Core class

UIView view, what you can see on the screen is a view, such as: Buttons, text labels, tables, etc.

Uiviewcontroller: The internal default has a view (UIView) that is responsible for managing the UIView lifecycle, assembling data to display on UIView, and handling its events

iOS with MVC mode: Model-view-controller

2) Operation Process

How iOS Works

1. Perform the main function first

2.main function call Uiapplicationmain function

Create a UIApplication instance, this is a singleton object, an iOS program corresponds to a uiapplication instance

Turn on a message loop (main loop) to listen to the user's actions

UIApplication objects are symbols of the application

Once the object instance is created, the application delegate object is created, which is responsible for authenticating the application's lifecycle

Methods in the Delegte

(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (nsdictionary*) launchOptions

Called after the application has finished loading

-(void) Applicationwillresignactive: (uiapplication *) application

Lost Focus Call

(void) Applicationdidenterbackground: (uiapplication *) application

Listens to the application lifecycle, which is called when the application enters the background

(void) Applicationwillenterforeground: (uiapplication *) application

Called when the application enters the foreground

(void) Applicationdidbecomeactive: (uiapplication *) application

Called when the focus is taken, before the user can interact with the focus

(void) Applicationwillterminate: (uiapplication *) application

Called when the program appears terminated. Not every time the end is called

An explanation of the iOS running process of OC Learning Summary

Related Article

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.