Skip to main content

I have 2 text boxes that I have auto layout with. One works right because it doesn’t have constraints so I can set the text to hug. The other one will not work like that because it has constraints on the text and so it will not allow me to set it to hug, if I change it to hug it just goes back to fixed immediately.


The only way for me to fix it is to delete it and start again, but if I could remove the constraints I think that would fix it. I have a lot of items in my library that was imported so I don’t want to have to delete everything and recreate it from scratch, I should just be able to edit things and remove the constraints.


Without looking at the file, the only thing I can guess is either 1) you accidentally nested the text with the constraints inside a frame that doesn’t have auto-layout applied OR 2) it’s a bug. Objects inside a frame with auto-layout shouldn’t have the constraints available.


If you CMD-click on the text then press the \ button, it will select the parent of your text. Do that and double-check that you have auto-layout applied to its container, then report back if it looks good!


The text isn’t in a frame, its parent is the main component, just like the one that works. It just will not remove the constraints.


Screenshot 2024-01-31 at 1.33.13 PM


It looks like the text is set to absolute positioning, so you should be able to turn that off, which will remove the constraints option. And then you can set the main frame/component with the text inside it to hug contents.



Thanks, that was it 🙂


Reply