What is the layout life cycle in UIKit?

Asked on 2026-06-15

1 search

UIKit’s layout life cycle is a repeating pair of passes that happen after traits are updated:

  1. Layout pass

    • UIKit updates each view’s traits top-down.
    • Then it calls layoutSubviews.
    • If any view invalidates layout during that pass, UIKit repeats the layout pass until everything is settled.
  2. Display pass

    • Once layout is stable, UIKit performs the display pass.
    • It calls draw(_:) on each view that needs display.
    • If drawing causes more views to need display, UIKit repeats until all views are done.

After both passes finish, the next frame can be rendered and shown on screen.

From What’s new in UIKit, UIKit also notes that in iOS 26, the new updateProperties callback happens after traits are updated and before layoutSubviews, effectively splitting layout-related work into:

  • property updates first
  • then the usual layout logic

If you want, I can also summarize how this differs from older UIKit behavior.