Swiftpack.co - henrik-dmg/HPLayout as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by henrik-dmg.
henrik-dmg/HPLayout 2.0.1
A simple layout DSL to make your Autolayout life a little easier
⭐️ 0
🕓 2 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/henrik-dmg/HPLayout.git", from: "2.0.1")

HPLayout

A simple layout DSL to make your Autolayout life a little easier.

Installation

Xcode

File -> Swift Packages -> Add Package Dependency -> https://github.com/henrik-dmg/HPLayout

Package.swift

.package(url: "https://github.com/henrik-dmg/HPLayout", from: "2.0.0")

CocoaPods

Add pod 'HPLayout' to your Podfile

Usage

yourAwesomeView.layout {
    $0.leadingAnchor == someOtherView1.trailingAnchor + 8
    $0.trailingAnchor <= someOtherView2.trailingAnchor
    $0.spanHorizontally(.superView, constant: 4)
}

// or

someOtherView.addSubview(yourAwesomeView) {
    $0.leadingAnchor == someOtherView1.trailingAnchor + 8
    $0.trailingAnchor <= someOtherView2.trailingAnchor
    $0.spanHorizontally(.superView, constant: 4)
}

GitHub

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

Release Notes

Initial Release
3 years ago

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