Skip to content

Instantly share code, notes, and snippets.

@cjnevin
Created October 23, 2022 00:38
Show Gist options
  • Save cjnevin/927f7d5b9477ef67428e255d723b75f8 to your computer and use it in GitHub Desktop.
Save cjnevin/927f7d5b9477ef67428e255d723b75f8 to your computer and use it in GitHub Desktop.
addSubview(redView) {
$0.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 20)
$0.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -20)
$0.topAnchor.constraint(equalTo: topAnchor, constant: 20)
$0.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -20)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment