标签:
执行顺序如下:
2015-11-18 10:37:40.877 Test-All[6252:69490] viewWillAppear:
2015-11-18 10:37:40.882 Test-All[6252:69490] viewWillLayoutSubviews(默认会执行一次)
2015-11-18 10:37:40.882 Test-All[6252:69490] viewDidLayoutSubviews(默认会执行一次)
2015-11-18 10:37:40.883 Test-All[6252:69490] viewWillLayoutSubviews (如果有添加子视图,则会再次调用此函数,且加几个子视图都是调用一次)
2015-11-18 10:37:40.883 Test-All[6252:69490] viewDidLayoutSubviews
2015-11-18 10:37:41.391 Test-All[6252:69490] viewDidAppear:(与 viewWillAppear: 之间隔着viewWillLayoutSubviews和viewDidLayoutSubviews两个方法)
当然viewDidLoad是在这些函数之前调用的。。。
标签:
原文地址:http://www.cnblogs.com/shiguangji728/p/4973743.html