Reputation: 1251
Basically, I want to align 2 buttons in the same row, with about 1/3 responsive spacing between buttons and edges, like the following picture:
However, what's inside the simulator is like this:
Constraints added for each button are:
Therefore, is there any way to align these 2 buttons correctly in a row using auto layout?
Upvotes: 1
Views: 2070
Reputation: 51911
You should use "spacer" view like this:
constraint like
H:|[spacer1][button1(120)][spacer2(==spacer1)][button2(120)][spacer3(==spacer1)]|
Upvotes: 3
Reputation: 13766
Control drag from one button to the other button, select horizontal spacing.
Upvotes: 1