UIStackView with size class

I looked at UIStackView and I don’t understand how it can be used with the Resize class. I would like to have imageView and textView inside stackView in vertical (portrait) mode. I would also like to have the same thing, but in horizontal (landscape) mode.

I can detect the rotation and change the orientation of the stack. Is it correct?

+4
source share
1 answer

The best way to change the appearance of the stack between portrait and landscape modes using size classes is:

  • Select the stack view in the storyboard and look at the attribute inspector: enter image description here
  • "" , , , : enter image description here
  • , , , , : enter image description here

, . !

+4

Source: https://habr.com/ru/post/1606995/


All Articles