Saturday, 16 May 2015

Using Constraints to align a button bottom center of your app.

Select your button and position it in the bottom center of your app.


Press the pin button and select the bottom constraint and then press the 'Add 1 Constraint' button


Press the align button and check the check-box for Horizontal Center in Container and then press the 'Add 1 Constraint' button


Your 2 new constraints will appear in the View Controller Scene


Run your app in the iOS simulator and your button will appear in the bottom center.


Rotate your app to the right and your button will still appear in the bottom center.

No comments:

Post a Comment