- init does not cause layoutSubviews to be called (duh)
init方法不會觸發
- addSubview: causes layoutSubviews to be called on the view being added, the view it’s being added to (target view), and all the subviews of the target
addSubview在目標視圖被添加子視圖的時候觸發
- view setFrame intelligently calls layoutSubviews on the view having its frame set only if the size parameter of the frame is different
view的frame發生變化的時候觸發
- scrolling a UIScrollView causes layoutSubviews to be called on the scrollView, and its superview
scrollview和它的父視圖滾動的時候觸發
- rotating a device only calls layoutSubview on the parent view (the responding viewControllers primary view)
轉旋設備的時候,相應的視圖控制器對應的主視圖會觸發
- Resizing a view will call layoutSubviews on its superview
改變視圖大小的時候會在視圖的父視圖上觸發