The compact height size dimension class does not work properly with the UIStackView axis and the real device

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

enter image description here

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

enter image description here

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

enter image description here

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 .

+5
source share
1 answer

Just touch the "Distribution" section of the + button and select "Any x Compact Height" and fill in the same way. Hope this works well.

0
source

All Articles