1. application didFinishLaunchingWithOptions:(NSDictionary *)launchOptionsapp
Tells the delegate when the application has launched and may have additional launch options to handle.post
在應用程序啓動後,要執行的委託調用。ui
2. applicationWillResignActive:(UIApplication *)applicationthis
Tells the delegate that the application is about to become inactive.This method is called to let your application know that it is about to move from the active to inactive state.After calling this method, the application also posts a UIApplicationWillResignActiveNotification notification to give interested objects a chance to respond to the transition.rest
在應用程序將要由活動狀態切換到非活動狀態時候,要執行的委託調用,如 按下 home 按鈕,返回主屏幕,或全屏之間切換應用程序等。orm
3. applicationDidEnterBackground:(UIApplication *)applicationit
Tells the delegate that the application is now in the background.Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.io
在應用程序已進入後臺程序時,要執行的委託調用。form
4. applicationWillEnterForeground:(UIApplication *)application後臺
Tells the delegate that the application is about to enter the foreground.Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
在應用程序將要進入前臺時(被激活),要執行的委託調用,恰好與 applicationWillResignActive 方法相對應。
5. applicationDidBecomeActive:(UIApplication *)application
Tells the delegate that the application has become active.Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
在應用程序已被激活後,要執行的委託調用,恰好與 applicationDidEnterBackground 方法相對應。
6. applicationWillTerminate:(UIApplication *)application
Tells the delegate when the application is about to terminate.Called when the application is about to terminate. Save data if appropriate.
在應用程序要徹底推出的時候,要執行的委託調用。