Last active
June 13, 2020 05:01
-
-
Save josh-marasigan/c6da1f77e3846b4f93184ce5d549c4b4 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 view1 = UIView() | |
view1.backgroundColor = UIColor.systemIndigo | |
view.addSubview(view1) | |
view1.snp.makeConstraints { make in | |
make.top.equalToSuperview().offset(250) | |
make.leading.equalToSuperview().offset(20) | |
make.width.height.equalTo(view.snp.width) | |
.dividedBy(2).offset(-30) | |
} | |
let view2 = UIView() | |
view2.backgroundColor = UIColor.systemPink | |
view.addSubview(view2) | |
view2.snp.makeConstraints { make in | |
make.centerY.equalTo(view1) | |
make.leading.equalTo(view1.snp.trailing).offset(20) | |
make.width.height.equalTo(view1) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment