Skip to main content
Question

Autolayout Changes Component Positions


Matt26

I have three components I need to stay right where they are, but when I click autolayout, they all shift around. The only solution I’ve found is to group them together twice and then hit A.L. (grouping them only once shifts them after A.L.). Any thoughts on why I can’t just position components and then A.L. without them moving around? Thanks!

4 replies

Gabriele_Malaspina

Not sure what you mean. Can you share a screenshot to explain better what you want to obtain, please?


Matt26
  • Author
  • 2 replies
  • May 23, 2022

What it should look like:

What it ends up doing when I group “once” or click autolayout before grouping them twice:


Gabriele_Malaspina

Auto layout has a single direction property, vertical or horizontal, so to create something similar you need two frames, one for the text with vertical direction and another one for the entire object with horizontal direction (you can set the direction from the Auto layout section in the Design panel):

Another way to create something similar is to use a single frame with a vertical direction and set the absolute position (new feature) for the square and increase the left padding of the container:

Personally, I prefer the first solution, it’s more similar to what a dev has to do to develop it.


Matt26
  • Author
  • 2 replies
  • May 26, 2022

Thanks so much for the response. Appreciate it!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings