Skip to main content
Solved

Preserved spacing not adjusted after autolayout


Hi everyone! after using auto layouts for my two posts, the spacing didn’t adjust if I tried to add more contents in the text part. Would really appreciate if anyone can help me with the issue, thanks in advance.

Best answer by Josh

Thanks! Ah it looks like the instance called Sample post is set to a fixed height which is why it’s not adapting to the text of the post. Make sure to set that to Hug contents. You’ll also want to set the test to be auto height instead of fixed height.

I made some edits directly in that file. Let me know if you have any other questions.

View original
This topic has been closed for comments

7 replies

Josh
  • Former Community Manager
  • 1019 replies
  • August 5, 2023

It’s hard to tell exactly from just the screenshot but it looks like you’ll need to add autolayout to the nested instances as well. Do the Sample Posts have autolayout applied to them?


  • Author
  • 3 replies
  • August 9, 2023


I just made sure each sample posts are applied with autolayout, but it still doesn’t work. Are there any other ways I could do?


Josh
  • Former Community Manager
  • 1019 replies
  • August 11, 2023

Any chance you could share a file here so we can take a closer look?


  • Author
  • 3 replies
  • August 11, 2023

Josh
  • Former Community Manager
  • 1019 replies
  • Answer
  • August 11, 2023

Thanks! Ah it looks like the instance called Sample post is set to a fixed height which is why it’s not adapting to the text of the post. Make sure to set that to Hug contents. You’ll also want to set the test to be auto height instead of fixed height.

I made some edits directly in that file. Let me know if you have any other questions.


  • Author
  • 3 replies
  • August 11, 2023

Thanks so much Josh! I have no further questions


  • 0 replies
  • August 18, 2023

This topic was automatically closed 3 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