Layout
UIView LifeCycle
1. initWithCoder:
layerClass
setNeedsDisplay
addConstraints:
addConstraint: (can happen multiple times)
2. willMoveToSuperview:
3. invalidateIntrinsicContentSize
4. didMoveToSuperview
5. awakeFromNib
6. willMoveToWindow:
7. needsUpdateConstraints
8. didMoveToWindow
9. setNeedsLayout
10. updateConstraints
intrinsicContentSize
11. layoutSubviews (can happen multiple times)
12. drawRect:
Animate
Color Animation
UIView.animate(withDuration: 1, animations: {
self.backgroundColor = .brown ...