iOS 布局

The update cycle is the point at which control returns to the main run loop after the app finishes running all your event handling code.

It’s at this point that the system begins updating layout, display, and constraints

Automatic refresh triggers

  • Resizing a view
  • Adding a subview
  • User scrolling a UIScrollView (layoutSubviews is called on the UIScrollView and its superview)
  • User rotating their device
  • Updating a view’s constraints
    However, there are ways to trigger layoutSubviews directly as well.
iOS 布局_第1张图片
image.png

你可能感兴趣的:(iOS 布局)