Created
April 24, 2019 13:23
-
-
Save onmyway133/ac61a9abcb8863ec42781e55fee5ce8f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let views = ["box" : box] | |
let horizontal = "H:|-20-[box]-20-|" | |
let vertical = "V:|-50-[box(100)]" | |
let horizontalConstraints = NSLayoutConstraint.constraints(withVisualFormat: horioptions: [], metrics: nil, views: views) | |
let verticalConstraints = NSLayoutConstraint.constraints(withVisualFormat: veoptions: [], metrics: nil, views: views) | |
NSLayoutConstraint.activate([horizontalConstraints, verticalConstraints].flatMap({ $0 })) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment