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:
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.:
Though that seems like a far more complicated task.