How to use both autolayout and constraints

can someone tell me how to use autoresize to center my selected in blue view?? if i add the "center in view" constraint it erases all of the autoresizing...https://snag.gy/2XqQLI.jpg

Replies

What do you want to get ?


Autoresize is for inside view to grow and shrink with the outer view.


If you want to center (not resize), just define constraints : center horizontally and vertically.


If you want both, first center the inner view in the outerview

Then use autresize and select the inside arrows (horizontal and vertical) of the target, not the segments on the border.

Have a many ways to do that. Your app will be on landscape too? You can set the constraints diferents when your app rotatelly to landscape.

Only vertically, you can define the height (top), left and right on the constrainsts and marked the height.

Depends if the contents is inside the some view.

Storyboard have a great power with this things!