How to keep the same spacing when rotating the screen? (Autolayout)

I have two labels (vertically spaced). When switching to landscape, the spacing is slightly larger between the two. I want to keep the spacing the same no matter if I'm in portrait or landscape. I want to do this using the storyboard autolayout system, not through code.


I've messed with content hugging, content compression, and also changing the priority of vertical space constraints. Not sure if I was making the right adjustments.


Any help would be greatly appreciated.


Thanks in advance.

Accepted Answer

>I want to do this using the storyboard autolayout system


Successful auto layout, when responding to a dynamic/external change such as device rotation, basically relies on constraints and size classes.


See:

- Views with Intrinsic Content Size

- Anatomy of a Constraint

- Working with Constraints in Interface Builder

How to keep the same spacing when rotating the screen? (Autolayout)
 
 
Q