Swiftpack.co - moein-barzegaran/StackUI as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by moein-barzegaran.
moein-barzegaran/StackUI 1.0.0
This is a swift package for creating amazing vertical and horizontal stacks like SwiftUI but usnig UIKit
⭐️ 7
🕓 2 years ago
iOS
.package(url: "https://github.com/moein-barzegaran/StackUI.git", from: "1.0.0")

StackUI

This is a swift package for handling stacks like SwiftUI but inside UIKit! Please let me know your feedbacks.

You could create your vertical or horizontal stackview in a simple lines of code.

Usage example:

let verticalStack = VStack {
    titleLabel
    headerImageView
    footerLabel
}

So you don't need to use ',' in the end of each element like adding views in the SwiftUI.

You can also use Spacer element to add your custom spacing between views. like this:

let verticalStack = VStack {
    titleLabel
    headerImageView
    Spacer(20)
    footerLabel
}

For adding custom alignment, distribution and spacing to the stack view you could add your setup like this:

let verticalStack = VStack(alignment: .fill, distribution: .fill, spacing: 12) {
    titleLabel
    headerImageView
    footerLabel
}

GitHub

link
Stars: 7
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Related Packages

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