Objcets lose position when auto layout

Hi There, i’m learning auto layout features,

while i’m doing this exercise i have to combine two auto layouted objects in an bigger one. When i create another auto layout the position of the earliers change, and i don’t know how to clean up this mess. Does someone know the solution ?

Thanks !

Here i’m attaching a screenshot, the resault i would like to achieve is one big auto layout wich contains the other two smaller one, but without changing position

Hey Lorenzo, I would suggest you add left-padding to the bottom part of the UI (the one that contains the play button and white buttons). This will push it to the right and you can make the composition look like the “before” example but all within one big auto layout container.

1 Like

Thanks Alice,

and how about the auto layout properties ? I mean, the bigger one should stay in “hug contents” while the others in “fixed width” ?

You’re welcome! Having the parent container hugging on all sides seems good. But that could change if you dropped it inside of a screen, just depends what your needs are for the overall composition.

I would actually recommend using hug on all sides for the two inner containers as well (not fixed)!

1 Like