func buttonConstraint() { // Center button in Page View NSLayoutConstraint( item: button, attribute: .CenterX, relatedBy: .Equal, toItem: view, attribute: .CenterX, multiplier: 1.0, constant: 0.0) .active = true // Set Width to be 30% of the Page View Width NSLayoutConstraint( item: button, attribute: .Width, relatedBy: .Equal, toItem: view, attribute: .Width, multiplier: 0.3, constant: 0.0) .active = true // Set Y Position Relative to Bottom of Page View NSLayoutConstraint( item: button, attribute: .Bottom, relatedBy: .Equal, toItem: view, attribute: .Bottom, multiplier: 0.9, constant: 0.0) .active = true }