6

I have 2 views in a horizontal UIStackView. What I'm trying to achieve is for the stack view to stay in horizontal mode if possible, but if this isn't possible then change to a vertical mode. Demonstrated in the image below. When in the second case it can't fit horizontally it changes to vertical: Stack view

How could this be achieved using UIStackViews and autolayout? In a more general sense I would love to have a view that mimics CSS flex-wrap properties. I.e.:

flex-wrap

Though that seems like a far more complicated task.

double-beep
  • 5,031
  • 17
  • 33
  • 41
Ben Easton
  • 195
  • 8

0 Answers0