- If you run the demo app we created in the previous section, you will see that views are not aligned properly, as we didn't add any constraints. For example, check how the label appears when you open the third view controller when you click on the third tab:
- As you see, the label is not centered in the iPhone SE simulator.
- Using constraints, you can center any view horizontally or/and vertically in its container view. To do this, click on the label that you want to be in the center, press the Ctrl key and drag the label to the super view. A pop-up list of constraints will appear, as follows:
- To select multiple constraints ...