A SwiftUI Layout that chooses the Layout that fits

LayoutThatFits

ViewThatFits is awesome but I didn’t like the duplicate content and the lack of animation so I created LayoutThatFits which takes a single closure for content and an array of “any Layout”

The example shows an HStack and VStack but it can take any other custom layout.

My tweet about it.

The original Gist

Submission for Dub Dub Series

GitHub

View Github