IOS18 Program startup process

Source: Internet
Author: User

Briefly describe the life cycle when the application presses the home key into the background and the life cycle from the background back to the foreground? The status of the application: not running is not running, the program does not start inactive    inactive, the program runs in the foreground, but does not accept the event, there is no event processing state is usually in this state. The active      activator   is in the foreground and receives the event Backgound Daemon   in the background and can execute the code, most of the programs will stay in this state for a while after entering this state.   the Suspended suspend  program cannot execute code in the background.
//? Tells the agent that the process has started but has not yet entered a state save
-(BOOL) Application: (UIApplication *) application willfinishlaunchingwithoptions: (Nsdictionary *) launchOptions?

// tell the agent to start the basic Completion program ready to start running
-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) launchOptions?

// when the application is going to be inactive, during which time the application does not receive messages or events, such as coming to the phone
?- (void) Applicationwillresignactive: (uiapplication *) application

// when the application is in active state, this is just the opposite of the method above
?- (void) Applicationdidbecomeactive: (uiapplication *) application?

Called when the program is pushed to the background. So to set the background to continue running, you can set it in this function ?
- (void) Applicationdidenterbackground: (uiapplication *) application?

called when the program is going back to the foreground from the background, which is exactly the opposite of the method above. 
?-(void) Applicationwillenterforeground: (uiapplication *) application?

when the program is about to exit is called, it is usually used to save the data and some cleanup work before exiting. This needs to set the key value of the uiapplicationexitsonsuspend. 
?-(void) Applicationwillterminate: (uiapplication *) application?
executes when the program is loaded
?-(void) Applicationdidfinishlaunching: (uiapplication*) application?

IOS18 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.