Reputation: 5172
I'm using UIStackViews with UILabels in my project. Basically I have horizontal stack view and two labels inside. Alignment: Fill, Distribution: Fill proportionally. I'd expect that second label will be right after first one. But it's not.I tried various alignments but nothing worked. Any idea what I'm doing wrong?
xib file:
Upvotes: 0
Views: 153
Reputation: 13276
You screenshot doesn't show the constraints your using in your xib but I assume there is a constraint stating that the right/trailing side of your UIStackView
should equal the right/trailing side of your view. If you change it so the UIStackView
is <= your view, it should layout how you want.
Upvotes: 1