调用updateConstraintsIfNeeded 不要直接调 updateConstraints
如果没有 autolayout updateConstraints 默认不会发送到view 可以手动调用 setNeedsUpdateConstraints
call super 引起所有子视图到新frame
如果没有 autolayout updateConstraints 默认不会发送到view 可以手动调用 setNeedsUpdateConstraints
call super 引起所有子视图到新frame
调用顺序
viewDidLoad
viewWillAppear
myview updateConstraints //子视图updateContrains先调用
updateViewConstraints
viewWillLayoutSubviews
viewDidLayoutSubviews
layoutSubviews
drawRect:
viewDidAppear