////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