mirror of https://github.com/SnapKit/SnapKit
Remove unneeded closure ornamentation
This commit is contained in:
parent
c0d8a7d3e8
commit
6f5b8c4e55
|
@ -60,34 +60,34 @@ class SimpleLayoutViewController: UIViewController {
|
||||||
|
|
||||||
if (!didSetupConstraints) {
|
if (!didSetupConstraints) {
|
||||||
|
|
||||||
blackView.snp_makeConstraints(closure: { (make) -> Void in
|
blackView.snp_makeConstraints { make in
|
||||||
make.center.equalTo(view)
|
make.center.equalTo(view)
|
||||||
make.size.equalTo(CGSizeMake(100.0, 100.0))
|
make.size.equalTo(CGSizeMake(100.0, 100.0))
|
||||||
})
|
}
|
||||||
|
|
||||||
redView.snp_makeConstraints(closure: { (make) -> Void in
|
redView.snp_makeConstraints { make in
|
||||||
make.top.equalTo(blackView.snp_bottom).offset(20.0)
|
make.top.equalTo(blackView.snp_bottom).offset(20.0)
|
||||||
make.left.equalTo(20.0)
|
make.left.equalTo(20.0)
|
||||||
make.size.equalTo(CGSizeMake(100.0, 100.0))
|
make.size.equalTo(CGSizeMake(100.0, 100.0))
|
||||||
})
|
}
|
||||||
|
|
||||||
yellowView.snp_makeConstraints(closure: { (make) -> Void in
|
yellowView.snp_makeConstraints { make in
|
||||||
make.top.equalTo(blackView.snp_bottom).offset(20.0)
|
make.top.equalTo(blackView.snp_bottom).offset(20.0)
|
||||||
make.left.equalTo(blackView.snp_right).offset(20.0)
|
make.left.equalTo(blackView.snp_right).offset(20.0)
|
||||||
make.size.equalTo(CGSizeMake(100.0, 100.0))
|
make.size.equalTo(CGSizeMake(100.0, 100.0))
|
||||||
})
|
}
|
||||||
|
|
||||||
blueView.snp_makeConstraints(closure: { (make) -> Void in
|
blueView.snp_makeConstraints { make in
|
||||||
make.bottom.equalTo(blackView.snp_top).offset(-20.0)
|
make.bottom.equalTo(blackView.snp_top).offset(-20.0)
|
||||||
make.left.equalTo(blackView.snp_right).offset(20.0)
|
make.left.equalTo(blackView.snp_right).offset(20.0)
|
||||||
make.size.equalTo(CGSizeMake(100.0, 100.0))
|
make.size.equalTo(CGSizeMake(100.0, 100.0))
|
||||||
})
|
}
|
||||||
|
|
||||||
greenView.snp_makeConstraints(closure: { (make) -> Void in
|
greenView.snp_makeConstraints { make in
|
||||||
make.bottom.equalTo(blackView.snp_top).offset(-20.0)
|
make.bottom.equalTo(blackView.snp_top).offset(-20.0)
|
||||||
make.right.equalTo(blackView.snp_left).offset(-20.0)
|
make.right.equalTo(blackView.snp_left).offset(-20.0)
|
||||||
make.size.equalTo(CGSizeMake(100.0, 100.0))
|
make.size.equalTo(CGSizeMake(100.0, 100.0))
|
||||||
})
|
}
|
||||||
|
|
||||||
didSetupConstraints = true
|
didSetupConstraints = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue