Swiftpack.co - doHernandezM/ManualStack as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by doHernandezM.
doHernandezM/ManualStack 1.1.3
Manual stack lets you conditionally choose a VStack or HStack.
⭐️ 0
🕓 8 weeks ago
iOS macOS
.package(url: "https://github.com/doHernandezM/ManualStack.git", from: "1.1.3")

ManualStack

Manual stack lets you conditionally choose a VStack or HStack.

Call this just like a normal stack, except pass a Bool to let it know how to behave. Set the ManualStack's isVertical to true for a VStack and false for and HStack.

Example:

ManualStack(isVertical: true){
    ForEach(allInTheRainbowsColors, id:\.self){ color in
        Rectangle()
            .frame(width: 200.0, height:50.0)
            .foregroundColor(color)
    }
}

I very much stole and butchered this from Hacking With Swift

GitHub

link
Stars: 0
Last commit: 8 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

8 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics