iOS应用程序running


//程序启动
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    NSLog(@"%s",__PRETTY_FUNCTION__);
    return YES;
}
//程序将要进入不活跃状态
- (void)applicationWillResignActive:(UIApplication *)application {
    NSLog(@"%s",__PRETTY_FUNCTION__);
}
//程序已经进入后台
- (void)applicationDidEnterBackground:(UIApplication *)application {
    NSLog(@"%s",__PRETTY_FUNCTION__);
}
//程序将要进入前台
- (void)applicationWillEnterForeground:(UIApplication *)application {
    NSLog(@"%s",__PRETTY_FUNCTION__);
}
//进入活跃状态
- (void)applicationDidBecomeActive:(UIApplication *)application {
    NSLog(@"%s",__PRETTY_FUNCTION__);
}
//程序终止
- (void)applicationWillTerminate:(UIApplication *)application {
    NSLog(@"%s",__PRETTY_FUNCTION__);
}
/*
 *第一次程序启动
-[AppDelegate application:didFinishLaunchingWithOptions:]
-[AppDelegate applicationDidBecomeActive:]

 * Shift+command+h 或者home键退出程序
 -[AppDelegate applicationWillResignActive:]
 -[AppDelegate applicationDidEnterBackground:]
 
 *再次点击图标进入程序
-[AppDelegate applicationWillEnterForeground:]
-[AppDelegate applicationDidBecomeActive:]
*/


你可能感兴趣的:(iOS应用程序running)