appdelegate 生命周期简介

#pragma mark 在应用程序加载完毕之后调用
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    NSLog(@"加载完毕!");
    
}

#pragma mark 应用程序失去焦点的时候调用
- (void)applicationWillResignActive:(UIApplication *)application
{
    NSLog(@"失去焦点!");
}

#pragma mark 应用程序进入后台时调用(HOME)
- (void)applicationDidEnterBackground:(UIApplication *)application
{
    NSLog(@"点击Home进入后台时调用");
}

#pragma mark 应用程序进入前台时调用
- (void)applicationWillEnterForeground:(UIApplication *)application
{
 }

#pragma mark 当应用程序获取焦点时调用
- (void)applicationDidBecomeActive:(UIApplication *)application
{
 }

#pragma mark 应用程序终结时调用方法
- (void)applicationWillTerminate:(UIApplication *)application
{ 
}