Reputation: 69
I have difficulty to stretch all 5 buttons inside horizontal stack view as wide as my device width. Can I do that? or do you guys have any solutions?
Looking forward to your answer. Thank you very much for your attention.
Upvotes: 1
Views: 2401
Reputation: 3436
Upvotes: 2
Reputation: 333
If you have an horizontal stack view, set its constraints to left and right of the superview and the distribution to Fill Equally, so the buttons will fill the view in an equally way.
Upvotes: 1
Reputation: 3436
Simply select the five buttons, and add them to a stack view. Then pin the stack view to the left and right of the superview. The buttons will automatically span the entire view's horizontal space. See image below:
Upvotes: 0