I'm trying to accomplish the following view:
So what I have is a view and 6 labels, the top two labels have both leading and trailing space to container of 0, the bottom left two labels have leading space to container of 0, the bottom right two have trailing space to container of 0, and I have a spacing of 12 in between the bottom left two and the bottom right two.
However, this is what I get when I run it:
How can I fix it so it looks more like the first picture?
答案 0 :(得分:2)
Do you have an "equal width" constraint between the left labels and the right ones ? Without it, your "weird" issue is in fact totally right according to your constraint :
The left label tries to expand its width to the maximum possible. How can it ? By minimising the width of the right label, which is why it looks shrinked, but in the way its frame contains exactly the text "Label".
Select the left and right labels and add an "Equal widths" constraint in interface builder.