Last active
May 28, 2020 21:36
-
-
Save rlnucci/eed2f7d18d389f887caa72e58019271f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| private func configureHorizontalStack() { | |
| redView.addSubview(horizontalStack) | |
| // Cartography method to declared constraints | |
| let constraints = [ | |
| horizontalStack.leadingAnchor.constraint(equalTo: redView.leadingAnchor, constant: 30), | |
| horizontalStack.trailingAnchor.constraint(equalTo: redView.trailingAnchor, constant: -30), | |
| horizontalStack.topAnchor.constraint(equalTo: redView.topAnchor, constant: 25), | |
| horizontalStack.bottomAnchor.constraint(equalTo: redView.bottomAnchor, constant: -25) | |
| ] | |
| NSLayoutConstraint.activate(constraints) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment