Skip to main content
Question

Nested auto layout component with different sized variants ignores absolute positioning constraints


Sean_Cooley

I have a progress bar component that has two different sizes (M, L) and uses auto-layout hug so that when it’s nested in another component and swapped it changes size.

I’m nesting this progress bar in a Tile component and absolutely positioning it with left, right, and bottom pinning.

When I take an instance of the Tile component and try to resize the nested progress bar component, the component resizes, but it completely ignores the absolute positioning constraints and grows downward as if it was pinned to the top of the frame.

 

The only solution I have found so far is to wrap the nested component in another auto-layout frame and use that to control the pining, but this seems like unnecessary nesting. I would expected any nested component that has pinning constraints set to obey those constraints when it resizes.

 

Screen Recording attached

0 replies

Be the first to reply!

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