viewWillLayoutSubView

当viewController的bounds又改变,调用这个方法来实现subview的位置。可重写这个方法来实现父视图变化subview跟着变化。
 
 
 
 
 
 
 
 
 

> Lifecycle events order

  1. - (void)loadView
  2. - (void)viewDidLoad
  3. - (void)viewWillAppear
  4. - (void)viewWillLayoutSubviews
  5. - (void)viewDidLayoutSubviews
  6. - (void)viewDidAppear
原文地址:https://www.cnblogs.com/starainDou/p/5246389.html