Ambiguous vs unsatisfiable layout — what's the difference?
The gist
- Ambiguous — there are not enough constraints: the system of equations has several solutions and the engine picks any. Symptoms: the view "jumps" between launches, disappears, sticks to (0, 0), has zero size. There is no console error — that is what makes it insidious.
- Unsatisfiable — the constraints contradict each other: there is no solution. The engine prints
Unable to simultaneously satisfy constraints, lists the participants and drops one of them (Will attempt to recover by breaking constraint …), after which the layout looks random.
A typical source of both problems is a forgotten translatesAutoresizingMaskIntoConstraints = false: the constraints auto-generated from autoresizingMask either conflict with yours (unsatisfiable) or, if you set yours partially, the picture looks ambiguous.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep