Reputation: 434
Basically how do I use the aspect ratio constrain properly to set all buttons equally spaced with same width and height. I got the heights but then the four buttons using the aspect ratio constraint is confusing me a little bit. I can't seem to figure out the multiplier. There is no code for this, it is all using storyboards.
Upvotes: 0
Views: 3311
Reputation: 184
Looks like you want to have buttons with equal widths.
Select all the buttons and apply the following constraints. Make sure that the buttons do not overlap or else the leading and trailing constraints will be set with the wrong button.
Once that is done, select all the buttons and update their frames
That should do the trick.
Also, make sure the view that is holding the buttons has its constraints set.
Upvotes: 1