Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stretch the last element in UIStackView

I have vertical UIStackView which has two horizontal UIStackViews, if bottom UIStackView has larger width than UIStackView on the top then UIStackView on the top will be stretched to the width of the bottom UIStackView.

And now I have first element in the top UIStackView stretched, but I want to stretch last element.

Current:

enter image description here

Expected:

enter image description here

How can I achieve this?

like image 772
konstantin_doncov Avatar asked Dec 18 '22 06:12

konstantin_doncov


1 Answers

Assuming your labels have the default Horizontal Content Hugging Priority set to 251 each, change the Green Label to 252

enter image description here

Everything else you should be able to leave as you have it.

like image 166
DonMag Avatar answered Dec 27 '22 11:12

DonMag