Skip to content

Instantly share code, notes, and snippets.

@tomkowz
Created August 23, 2015 16:53
Show Gist options
  • Save tomkowz/2ad8ed91af66b910395d to your computer and use it in GitHub Desktop.
Save tomkowz/2ad8ed91af66b910395d to your computer and use it in GitHub Desktop.
let views = ["v1": v1, "super": self.view]
self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:[super]-(<=0)-[v1(50)]", options: .AlignAllCenterY, metrics: nil, views: views))
self.view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:[super]-(<=0)-[v1(100)]", options: .AlignAllCenterX, metrics: nil, views: views))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment