Reputation: 860
This sounds like a really simple issue but somehow I do not know how to easily solve it. Inside one row (UIStackView horizontal), I am trying to place two buttons (Cancel and OK) so that Cancel button will be at 1/4 (of the whole length) from left and Ok will be at the 3/4 (of the whole length) from left. I would like the buttons to be fixed length and not stretching to occupy the whole row.
Is there a way to solve it with just one UIStackView with 2 buttons? I am sure there a lots of alternatives (programing a view / use 3 UIStackViews).
Thanks.
Upvotes: 0
Views: 516
Reputation: 148
hope you can find an easy way using equalWidthconstraints instead for UIStackView.
ie. 1. You should place both buttons in a sam line.and make sure both button's width are same . 2.then you select both buttons and put EqualWidthConstraint. 3.After that pin the left button with top,left and right . 4.pin the right button with right,top spaces, 5.then you double click on the equalwidthconstraints and give Multiplier as you needed ; like 1:4,3:4 something like that. Thank you
Upvotes: 1