Episode #476

Easier Autolayout Constraints with SnapKit

Series: Layout in Code

12 minutes
Published on February 5, 2021

This video is only available to subscribers. Get access to this video and 572 others.

The built-in way of adding constraints in code requires quite a bit of code and is a bit cumbersome to write. I believe that we should aim to reduce friction when writing code like this to make it easier to add new views and change your layout. SnapKit is a pretty useful dependency that gives you a DSL for making autolayout constraints. In this episode we'll integrate SnapKit into the project and simplify our existing layout code.

This episode uses Swift 5.3, Xcode 12.3.