Skip to content

Instantly share code, notes, and snippets.

@Sethathi
Last active June 24, 2020 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sethathi/c777994c6db276a02589a904a99c4fe9 to your computer and use it in GitHub Desktop.
Save Sethathi/c777994c6db276a02589a904a99c4fe9 to your computer and use it in GitHub Desktop.
// What will be displayed by this code?
blueSquare.backgroundColor = UIColor.blue
redSquare.backgroundColor = UIColor.red
let constraints = [
redSquare.topAnchor.constraint(equalTo: blueSquare.topAnchor),
blueSquare.leftAnchor.constraint(equalTo: redSquare.leftAnchor, constant: -40),
blueSquare.bottomAnchor.constraint(equalTo: redSquare.bottomAnchor),
redSquare.rightAnchor.constraint(equalTo: blueSquare.rightAnchor, constant: -40)
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment