I have a two views I'd like to place in a way that they are equally spaced horizontally.
I'd like to define thier Center X
so that they are the third and two-thirds of the width of the superview but I have found no constraint setting that allows you to do that.
Can you tell me how can this be achieved?
You can use a Center X
constraint with the following settings:
For the second view the Multiplier
has to be 2/3
of course.
Result:
Select Align Center X from the subView and the Superview (screen of only the last one)
Change the multiplier: 2:3 for the first one, and 4:3 for the second one:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With