Skip to content

Instantly share code, notes, and snippets.

@pedrommcarrasco
Last active January 6, 2019 20:29
Show Gist options
  • Save pedrommcarrasco/1819ab318af946b29b0e5998b2d666a1 to your computer and use it in GitHub Desktop.
Save pedrommcarrasco/1819ab318af946b29b0e5998b2d666a1 to your computer and use it in GitHub Desktop.
Power-Up Your Anchors - Using priorities (before)
let bWidth = b.widthAnchor.constraint(equalToConstant: 50.0)
bWidth.priority = .defaultHigh
// or if you want between .defaultHigh and .required 👇 🤮
bWidth.priority = UILayoutPriority(UILayoutPriority.defaultHigh.rawValue + 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment