Skip to content

Instantly share code, notes, and snippets.

@nakiostudio
Last active October 5, 2017 10:01
Show Gist options
  • Save nakiostudio/d4e3d3322e368be9e55978eeb955e296 to your computer and use it in GitHub Desktop.
Save nakiostudio/d4e3d3322e368be9e55978eeb955e296 to your computer and use it in GitHub Desktop.
// EasyPeasy
view.easy.layout(Edges(10.0))
// SnapKit
view.snp.makeConstraints { (make) -> Void in
make.edges.equalTo(superview).inset(UIEdgeInsetsMake(10.0, 10.0, 10.0, 10.0))
}
// Cartography
constrain(view) { view in
view.edges == inset(view.superview!.edges, 10.0, 10.0, 10.0, 10.0)
}
// PureLayout
view.autoPinEdgesToSuperviewEdgesWithInsets(UIEdgeInsets(top: 10.0, left: 10.0, bottom: 10.0, right: 10.0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment