加载一个视图控制器依次调用:

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

      return YES;

}

- (void)viewDidLoad {

    [super viewDidLoad];

}

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

}

 

进入后台时

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

}

 

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

}

 

重新进入前台时

 

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

}

 

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

}