-2

I'm building a review application which amongst other things present a review, with the authors img, name, date and level. The problem arises since not everyones name is equal lenght, which makes the layout seem out of order, as visualized in the picture. How would one make the layout so that the items have similar space between each other regarding of name length?

enter image description here

As you can see the user name frqlich, is out in the open the idea would be to resize the label to the name and then pull the date and niveau label closer to they would have a constant distance. what is the best aproach?

Ulrik. S
  • 326
  • 2
  • 14

1 Answers1

0

How are you getting the data you show?, anyway, there are many ways, the easiest might be to use the Dynamic Type font in the name Label so that it automatically changes the font size to make it fit in the same space. Also, you can use a horizontal stack view, where you group the 3 elements with a constant distance between elements. And a more complex way might be to control drag the constraints to the code and set their value programmatically to be the same each time.

Enrique
  • 293
  • 1
  • 2
  • 15