Why do safe area collapse if I set leading and trailing constraint of a StackView

Viewed 24

I don't understand why if I set leading and trailing constraint to the horizontal StackView, the safe area of the view collapse to the StackView width, as you can see in the image.

enter image description here

enter image description here

1 Answers

I understood the problem, it was that the StackView inside (the one with image and label) had the Distribution property set as "Fill equally", and the button had a fixed width. I solved setting the Distribution property to "Fill"

Related