This method is called when the application is started
-(BOOL) Application: (uiapplication*) Application didfinishlaunchingwithoptions: (nsdictionary*) launchOptions{
}
-(void) Applicationwillresignactive: (uiappliction*) application{
This method is called when an application moves from an active state to an inactive state.
Typically, when an application is suddenly interrupted (such as a phone call). When the message comes in), the system will callback the method.
In addition, when the user leaves the program, the program starts to turn back and the method is also called
}
-(void) Applicationdidenterbackground: (uiapplication*) application{
You can usually override this method to free up shared resources, save user data, and cancel timers.
Developers can also use this method to save enough state data so that users can revert to their current state when they restart the app
If the application supports background execution, the method calls instead of application termination when the user exits
}
-(void) Appliactionwillenterforeground: (uiapplication*) application{
This method will be called when the application is about to enter the foreground
}
-(void) Applicationdidbecomeactive: (uiapplication *) Application {
This method is called when the application enters the foreground and moves to the active state
}
-(void) Applicationwillterminate: (uiapplication *) Application {
The system will call this method when the program is terminated.
}
Appdelegate Handling life cycle events for iOS apps