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.
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.
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"