app系统程序调用过程
2016-08-08 本文已影响45人
阿拉斯加的狗
/**
* app加载完毕的时候调用(一般只调用一次)
*
*/
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSLog(@"didFinishLaunchingWithOptions");
return YES;
}
/**
* app失去焦点的时候调用(UI控件不能正常使用)
*/
- (void)applicationWillResignActive:(UIApplication *)application
{
NSLog(@"applicationWillResignActive");
}
/**
* app进入后台的时候调用(app消失不见)
*/
- (void)applicationDidEnterBackground:(UIApplication *)application
{
NSLog(@"applicationDidEnterBackground");
}
/**
* app进入前台的时候调用(app显示出来)
*/
- (void)applicationWillEnterForeground:(UIApplication *)application
{
NSLog(@"applicationWillEnterForeground");
}
/**
* 当app获得焦点的时候调用(这时候整个app的UI控件都能正常使用)
*/
- (void)applicationDidBecomeActive:(UIApplication *)application
{
NSLog(@"applicationDidBecomeActive");
}
//app进入后台:休眠, 不能接受事情(比如关闭)
/**
* app关闭的时候调用(一般情况下不会调用)
*/
- (void)applicationWillTerminate:(UIApplication *)application
{
NSLog(@"applicationWillTerminate");
}