IOS生命周期
//运行时调用
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{}
//进入前台
- (void)applicationWillEnterForeground:(UIApplication *)application{}
//进入后台
- (void)applicationDidEnterBackground:(UIApplication *)application{}
//激活
- (void)applicationDidBecomeActive:(UIApplication *)application{}
//释放激活
- (void)applicationWillResignActive:(UIApplication *)application{}
//结束
- (void)applicationWillTerminate:(UIApplication *)application{}