https://github.com/ryanlintott/layoutthatfits
A SwiftUI Layout that chooses the Layout that fits.
https://github.com/ryanlintott/layoutthatfits
layout swiftui
Last synced: 12 months ago
JSON representation
A SwiftUI Layout that chooses the Layout that fits.
- Host: GitHub
- URL: https://github.com/ryanlintott/layoutthatfits
- Owner: ryanlintott
- Created: 2022-06-10T00:55:15.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-10T17:57:48.000Z (almost 4 years ago)
- Last Synced: 2025-04-30T13:08:31.182Z (about 1 year ago)
- Topics: layout, swiftui
- Language: Swift
- Homepage:
- Size: 18.6 KB
- Stars: 22
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://twitter.com/ryanlintott/status/1534706352177700871) about it.
The original [Gist](https://gist.github.com/ryanlintott/d03140dd155d0493a758dcd284e68eaa)
*Submission for [Dub Dub Series](https://www.swiftuiseries.com)*