autolayout Getting started with autolayout Installation or Setup


Example

To use auto layout we need to enable a boolean flag in storyboard. Its shown in the below image. After this we can use auto layout in our storyboard. There is another option if we want to use size classes or not. Size class is also a helpful option in auto layout which helps us to design for different device screen sizes differently with same or different elements. The image for the setup goes here. Its from the file inspector panel of the property editor in Xcode.

enter image description here