IOS Application生命周期


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

NSLog(@"application加载完毕");
return YES;
}

//这个失去焦点的时候

- (void)applicationWillRsesignActive:(UIApplication *)application{

NSLog(@"applicationWillResignActive失去焦点");

}

//当应用进入后台的时候

- (void)applicationDidEnterBackground:(UIApplication *)application {

NSLog(@"applicationDidEnterBackground进入后台");
}
//home-->回到应用类

- (void)applicationWillEnterForeground:(UIApplication *)application {

NSLog(@"applicationWillEnterForeground重新回到应用");

}
//当应用程序获取焦点的时候调用
- (void)applicationDidBecomeActive:(UIApplication *)application {

NSLog(@"applicationDidBecomeActive获取焦点");

}
//应用程序终止的时候
- (void)applicationWillTerminate:(UIApplication *)application {

NSLog(@"applicationWillTerminate程序终止");

}


你可能感兴趣的:(iOS)