Skip to content

Instantly share code, notes, and snippets.

@rlnucci
Last active May 28, 2020 21:36
Show Gist options
  • Select an option

  • Save rlnucci/a5151d52bb3e6a3bfc50fd8aa5736d1b to your computer and use it in GitHub Desktop.

Select an option

Save rlnucci/a5151d52bb3e6a3bfc50fd8aa5736d1b to your computer and use it in GitHub Desktop.
private func configureHorizontalStack() {
redView.addSubview(horizontalStack)
// Cartography method to declared constraints
constrain(horizontalStack, redView) { view, superview in
view.leading == superview.leading + 30
view.trailing == superview.trailing - 30
view.top == superview.top + 25
view.bottom == superview.bottom - 25
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment