0

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

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Ali Ihsan URAL
  • 1,894
  • 1
  • 20
  • 43

1 Answers1

1

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.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • But be careful because you may end up with conflicting constraints in landscape unless you also do something about whatever determines the width in portrait. – matt Oct 06 '18 at 22:57
  • If I unchecked the installed checkbox , the constraints remove for all. I think I didnt understand you :) – Ali Ihsan URAL Oct 06 '18 at 23:07
  • 1
    "If I unchecked the installed checkbox , the constraints remove for all" Yes, but see the Plus button? It's just like the Plus button next to Constant. You click that so you make a conditional checkbox for just landscape. – matt Oct 07 '18 at 00:51
  • Thats real perfect soluton. Thanks matt. – Ali Ihsan URAL Oct 07 '18 at 09:37