两个 UIViewController 之间页面切换的生命周期

两个 UIViewController 之间页面切换的生命周期

如下所示:

A push to B:

 [A.navigationController pushViewController:B animated:animated];
  1. A viewWillDisappear:
  2. B viewWillAppear:
  3. A viewDidDisappear:
  4. B viewDidAppear:

B pop back to A:

[B.navigationController popViewControllerAnimated:animated];
  1. B viewWillDisappear:
  2. A viewWillAppear:
  3. B viewDidDisappear:
  4. A viewDidAppear:

你可能感兴趣的:(两个 UIViewController 之间页面切换的生命周期)