Skip to main content
Solved

Using one-third or two-third in autolayout with fill container


Julian_Janssen

Is it possible to use fill-container and assign one element to one-third of space and the other two-thirds of space?
I need the component to be resizable.

image

Best answer by Brian_Saunders

You can use a regular frame with a 3-column layout grid to accomplish this one I think. Line up the child frames/objects with the column layout lines and set their constraints to Left + Right and they will follow the grid as it resizes. Set the frame with the grid on it to fill its parent auto layout container. Is this what you’re after? Sloppy GIF included. (edited to add layers panel screenshot)

thirds-example

CleanShot 2021-07-18 at 10.31.17@2x

View original
This topic has been closed for comments

Brian_Saunders

You can use a regular frame with a 3-column layout grid to accomplish this one I think. Line up the child frames/objects with the column layout lines and set their constraints to Left + Right and they will follow the grid as it resizes. Set the frame with the grid on it to fill its parent auto layout container. Is this what you’re after? Sloppy GIF included. (edited to add layers panel screenshot)

thirds-example

CleanShot 2021-07-18 at 10.31.17@2x


  • August 17, 2021

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.


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