Autolayout? Oh boy
summary
Explains how to stop thinking in frames and actually migrate Spring & Struts autosizing to constraint-based layout using NSLayoutConstraint (iOS6 API) and the Visual Format Language; shows debugging conflicting vs ambiguous constraints, using intrinsicContentSize, priorities (1–1000) and a concrete example: a 20pt‑margined square view then fixed by adding width/height and a 0.5 multiplier constraint in code. Demonstrates animation via layoutIfNeeded and notes an iOS5 helper library.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 1:34Prize and rules
- 3:08Layout history
- 6:02Frame-based layout
- 7:12Spring and strut
- 8:38Mental shift to Auto Layout
- 10:07How Auto Layout works
- 11:13Linear equations explained
- 13:23Solving constraints
- 15:10Auto Layout as magic wand
- 16:38Priorities in Auto Layout
- 17:25Demo in Interface Builder
- 22:16Auto Layout in code
- 23:40Simple Auto Layout example
- 24:23Constraint syntax
- 25:58Debugging ambiguous layouts
- 27:02Zen approach to constraints
- 28:45Animation with Auto Layout
- 30:34Alternative libraries
