I am using UIStackView
to define a list's layout.
I am trying to achieve the effect similar to this:
||Item1---spacing---Item2||
So, the two items are being pushed to the sides of the UIStackView
.
However, the items are grouped together in every possible combinations of distribution
and alignment
:
||Item1-Item2-----spacing-----||
I tried setting a large spacing value, i.e. 500. In that case, Item2
just goes off-screen.
Is there any way to "tie" Item1
and Item2
to the left and right sides of the UIStackView
, while allowing spacing to change depending on the screen width?