Skip to main content

Set line lenght to fill container

  • December 6, 2023
  • 4 replies
  • 848 views

As far as I know you can only set a fixed lenght for lines, so you can’t have a line that adjusts inside an autolayout.

I’ve avoided using lines, instead I use an autolayout layer and set the height to something like 1 or 2 px so it appears as a line, however I’m working on a protoype that uses dashed lines and I can’t seem to make it work. Adding a fill setting to lines would solve issues like this.

Or if someone has a better way of working around this issue I’d love to know.

4 replies

If I get your issue right, you can actually add “fill container” to a line in auto layout.


Maty
  • New Participant
  • January 4, 2024

It works for me, i use it all the time.


Check if you have Absolute positioning accidentally enabled. I had that issue.


Sean_Cassells

How do you add fill container to the file or where is this option?