init-初始化程序
viewDidLoad-加载视图
viewWillAppear-UIViewController对象的视图即将加入窗口时调用;
viewDidApper-UIViewController对象的视图已经加入到窗口时调用;
viewWillDisappear-UIViewController对象的视图即将消失、被覆盖或是隐藏时调用;
viewDidDisappear-UIViewController对象的视图已经消失、被覆盖或是隐藏时调用;
didReceiveMemoryWarning-当内存过低,释放一些不需要的视图时调用。
Log次序:
打开视图时
2014-09-03 18:57:50.528 test[588:60b] init
2014-09-03 18:57:50.531 test[588:60b] viewDidLoad
2014-09-03 18:57:50.532 test[588:60b] viewWillApper
2014-09-03 18:57:50.538 test[588:60b] viewDidLayoutSubviews
2014-09-03 18:57:51.039 test[588:60b] viewDidApper
退出视图时:
2014-09-03 18:59:28.180 test[595:60b] viewWillDisappear
2014-09-03 18:59:28.685 test[595:60b] viewDidDisappear
2014-09-03 18:59:28.685 test[595:60b] dealloc
内存警告时:
- (void)didReceiveMemoryWarning