Adding constraints to elements in your app helps your app look consistent between different devices that run iOS. You can have a button that is centered in an iPhone 6 and is also centered in an iPad Pro. You can also have that button be centered depending on if you are viewing in portrait vs. landscape mode.
In your project, select the element to which you will add constraints. You can select it in the view controller navigation on the left side of Xcode. See it below, the button is highlighted.
Next click on the bar graph button on the bottom right of the view board. You can see a menu pops up.
Then you can click both Horizontally and Vertically in Constraint buttons on the left, then click the bottom button that says “Add 2 constraints”
Now your element is both vertically and horizontally aligned! Pretty neat and pretty easy!