Title:
1 #import "AppDelegate.h"2 3 @interfaceappdelegate ()4 5 @end6 7 @implementationappdelegate8 9 Ten-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) launchoptions { One //after the program starts, rewrite the location of the custom settings A returnYES; - } - the- (void) Applicationwillresignactive: (UIApplication *) Application { - //This method is triggered when an app is about to switch from active to inactive, when a temporary interrupt occurs (such as a call or text message) or when the user exits the application, and the app is converted to run in the background - //In This method the showroom is in the process of carrying out the task of the Jin Yong Timer, which will set the opengles frame rate, if the game is applied, the game should be paused in this method - } + -- (void) Applicationdidenterbackground: (UIApplication *) Application { + //in this method, free the shared resources, save the user data, clear the timer, and store enough to apply state information, in order to restore it to its current state when the application terminates. A //If your use support is executed in the background, then when the user exits it is called this method instead of Applicationwillterminate: Method at } - -- (void) Applicationwillenterforeground: (UIApplication *) Application { - //This method is called when the application transitions from the background run state to the active state, where you can reply to the information required for the application to function properly - } - in- (void) Applicationdidbecomeactive: (UIApplication *) Application { - //restarts a task that is paused (or not started) when the application is inactive. If the program runs in the background before, you can choose to refresh the user interface to } + -- (void) Applicationwillterminate: (UIApplication *) Application { the //The method is called when the program is about to terminate, and if necessary, save the data, see: Applicationdidenterbackground: Method * } $ Panax Notoginseng @end
Default method declaration in IOS appdelegate header file, Chinese translation