I would like to have two UIButtons
side by side in a UIStackView
both at 50% of the view. When I drag two buttons into the Stack View, the first one takes up the majority of the view and the other is the smallest width it can be.
Should I be doing something else?
Thanks
UIStackView Layout
801 views Asked by Tom Coomer At
3
You are doing right, but you may missed to do below thing.
You need to set the
UIStackViewDistribution
&UIStackViewAlignment
property as per your need.The
distribution
property determines the layout of the arranged views along the stack’s axis.The
alignment
property determines the layout of the arranged views perpendicular to the stack’s axis.Refer this for more info.