Search code examples
iosautolayoutuistackviewadaptive-layout

Give width to an element in Adaptive Layout


I implemented a stackview and set fill - fill equally with Vertical axis. And for landscape mode I do Regular Width & Compact Height fill - fill with Horizontal axis. I want to give static width to first element of stackview in Landscape Mode. When I give width in landscape mode , it effects to portrait mode and give width to portrait mode. Can I give a width only landspace mode ?

I added a pic. I want to remove Constant value or set to Standart Value or etc.

enter image description here

When give width it effects posrtrait mode that see in below pic

enter image description here

enter image description here

Thanks in advance


Solution

  • If the goal is that the Width constraint should apply only in landscape mode, you need to add that specification for the Installed checkbox (shown at the bottom of your screenshot). You want to say Yes (checked) for landscape and No (unchecked) otherwise.