Several methods in Appdelegate are introduced:
*-(BOOL) Application:didfinishlaunchingwithoptions:
Called when the app has finished loading
*-(void) Applicationwillresignactive:
Call when the app loses focus (lost focus UI control is not working, then the app can go backstage)
*-(void) Applicationdidenterbackground:
Call when app goes backstage (app disappears)
*-(void) Applicationwillenterforeground:
The app is called when it enters the foreground (app display)
*-(void) Applicationwillterminate:
App end, call when app is closed (but not normally called).
Note: When an app enters the background (hibernate) state, and then closes the app, it does not call Applicationwillterminate:
Method. Cause: You cannot receive any events (such as close) when the app goes into "Hibernate" state. However, some applications do not hibernate when they enter the background (such as "Music Player", "QQ", etc.). To achieve this effect, you need to add a configuration in "Info.plist": Configure the type of the app. ) Reference: http://www.cnblogs.com/tracy-e/p/3151457.html
* * Output a sentence in the above four agent methods to verify the order of execution.
Appdelegate-----IOS