Skip to content

Instantly share code, notes, and snippets.

@Pasanpr Pasanpr/layout.swift Secret
Created May 31, 2017

Embed
What would you like to do?
view.addSubview(firstChoiceButton)
firstChoiceButton.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
firstChoiceButton.centerXAnchor.constraint(equalTo: view.centerXAnchor),
firstChoiceButton.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -80.0)
])
view.addSubview(secondChoiceButton)
secondChoiceButton.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
secondChoiceButton.centerXAnchor.constraint(equalTo: view.centerXAnchor),
secondChoiceButton.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -32)
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.