~/talk

Behind the Scenes with Auto Layout - How to Solve Constraints with the Cassowary Algorithm

Talkat iOS Conf Singapore 2019 · on Friday, 2019-01-18· [swift, web-platform]

Shows how Auto Layout turns constraints into linear equations and solves them with the Cassowary algorithm, demonstrating an incremental solver that updates a cached tableau instead of recalculating from scratch. Converts inequalities with slack variables, uses marker variables to remove constraints, and pivots to reach a basic feasible solution then an optimum (example reduces the middle distance to 5). Explains why independent views scale linearly and why constraint priorities add measurable cost, with concrete steps and numbers.

AI-written summary · about

  1. 0:00Intro
  2. 2:29From developer to user
  3. 3:29Your input
  4. 4:11The Render Loop
  5. 5:24Auto Layout Engine
  6. 8:22WWDC 2018
  7. 9:47PlanGrid Papers
  8. 11:24Cassowary paper 97
  9. 12:22Incremental, optimized
  10. 13:38Linear Programming
  11. 14:06Constraint solving LP problem
  12. 14:31Let's solve constraints!
  13. 17:48Augmented Simplex Form
  14. 18:23Converting to equalities
  15. 21:31Basic feasible solved form
  16. 22:36Basic feasible solution
  17. 23:26Simplex Optimization
  18. 27:10Adding constraints
  19. 28:26Removing constraints
  20. 29:26Constraint priorities
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.