iOS APP 的生命週期

1.在手機桌面上點擊APP圖標app

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptionsit

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNilio

- (void)viewDidLoadclass

- (void)viewWillAppear:(BOOL)animated後臺

- (void)viewWillLayoutSubviews程序

- (void)viewDidLayoutSubviewsim

- (void)applicationDidBecomeActive:(UIApplication *)applicationanimate

- (void)viewDidAppear:(BOOL)animateddi

2.經過按Home鍵使應用程序切入到後臺view

- (void)applicationWillResignActive:(UIApplication *)application

- (void)applicationDidEnterBackground:(UIApplication *)application

3.再次進入APP

- (void)applicationWillEnterForeground:(UIApplication *)application

- (void)applicationDidBecomeActive:(UIApplication *)application

4.再次按Home鍵,而後直接kill掉這個程序

- (void)applicationWillResignActive:(UIApplication *)application

- (void)applicationDidEnterBackground:(UIApplication *)application

相關文章
相關標籤/搜索