Object C AppDelegate.h The use of each method

Source: Internet
Author: User

////APPDELEGATE.M//  ////Created by Kenshin Cui on 14-2-23.//Copyright (c) 2014 Kenshin Cui. All rights reserved.//#import "AppDelegate.h"@implementationappdelegate//execution after the start of the program, only after the first time the program is started, and then no longer executed;-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) launchoptions{returnYES;}//Sent When the application are about to move from active to inactive state.//This can occur for certain types of temporary interruptions (such as a incoming phone call or SMS message)//or when the user quits the application and it begins the transition to the background state.//Use the This method to the pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates.//Games should use this method to pause the game.//The program will be activated (get focus) execution, the program activates the user to operate;- (void) Applicationwillresignactive: (UIApplication *) application{}//Use the method to release shared resources, save user data, invalidate timers,//and store enough application state information-to-restore your application to their current state in case it's Termina Ted later. //If Your application supports background execution, this method is called instead of Applicationwillterminate:when th E user quits.//program into the background after execution, pay attention to enter the background will first lose focus and then into the background;- (void) Applicationdidenterbackground: (UIApplication *) application{}//called as part of the transition from the background to the inactive state;//Here's can undo many of the changes made on entering the background.//The program will be executed when it enters the foreground;- (void) Applicationwillenterforeground: (UIApplication *) application{}//Restart Any tasks this were paused (or not yet started) while the application is inactive.//If The application is previously in the background, optionally refresh the user interface.//The program is activated (get focus) after execution, note that the program will be activated when the first entry into the foreground and then be activated;- (void) Applicationdidbecomeactive: (UIApplication *) application{}//Called when the application are about to terminate.//Save Data if appropriate. See also Applicationdidenterbackground:.//The program executes at termination, including normal termination or abnormal termination, such as saying that an application that consumes too much memory after being too run (such as music playback software, social software, etc.) will unexpectedly terminate calling this method;- (void) Applicationwillterminate: (UIApplication *) application{}@end

Object C AppDelegate.h The use of each method

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.