Skip to main content
Question

Autolayout text set height & width

  • January 20, 2023
  • 1 reply
  • 1299 views

jessie1

Hi! I’ve got a button with an icon and text, where the icon is higher than the text. I want the button to always maintain the same height, but if I hide the icon (which is bigger) in the instance the button automatically adjusts to the height of the text. I really thought it was possible to set the height of the text to fixed, and set the width to hug content. However whenever I change the first to fixed, it automatically changes the latter to fixed as well, so I cannot have a fix height but flexible width or vice versa. I really thought it used to be possible… Driving me nuts 🙂 It looks like it can only be done with dirty workaround where I put the text in a separate autolayout within the button…

I really thought I was able to do this before 🙂

This topic has been closed for replies.

1 reply

tank666
  • 4873 replies
  • January 20, 2023

Instead of changing the text resizing function, set a fixed height for the variant in the component set.


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