Here's what it looks like in my storyboard and Preview:

And here is what I created in the storyboard for this UIStackView :

But everything changes when I run this on a real device:

Why is this happening?
Note that I have two UIStackViews icons: a shortcut icon, two buttons. The second one works correctly, but not the first one. What for? this is done exactly the same. Two direct UIStackView
EDIT
I realized that the problem occurs ONLY with UIImageView as a direct submission of UIStackView .
source share