Home / Auto Layout interview questions iOS
UIKit
Auto Layout interview questions iOS
Auto Layout is old, but it still appears in interviews because it reveals whether you can reason about layout and debug conflicts calmly.
The concepts interviewers test
Expect constraints and the layout equation, priorities, intrinsic content size, and the difference between content hugging and compression resistance. Interviewers may ask why a view is ambiguous or unsatisfiable, how the layout pass works, and how stack views reduce constraint boilerplate for common layouts.
Debugging under conflict
The senior part is debugging: explain reading the unsatisfiable-constraints console log, identifying which constraints conflict, and resolving it by adjusting priorities rather than deleting constraints blindly. Mention that ambiguous layout means too few constraints and unsatisfiable means too many or contradictory ones. That diagnostic clarity is what stands out.
Go deeper than a summary
Share Your Screen works topics like this through in full: 75 solved Swift problems with tests, 9 real case studies, and 7 annotated mock interviews, so you rehearse the live round instead of just reading about it.
Frequently asked
What is the difference between hugging and compression resistance?
Content hugging resists growing larger than intrinsic size; compression resistance resists shrinking smaller. Priorities decide which view yields when space is tight.
How do you debug a constraint conflict?
Read the unsatisfiable-constraints log to see which constraints clash, then adjust priorities or remove the contradictory one rather than guessing.