Swiftpack.co -  UnrealGlitch/UG_Layout as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
UnrealGlitch/UG_Layout
Auto layout
.package(url: "https://github.com/UnrealGlitch/UG_Layout.git", from: "1.0.1")

UG_Layout

How to use


contentView.prepareForAutoLayout().pinAll(to: view)


func configureSubviews() {
    view.addSubview(contentView)
    contentView.addSubview(settingsButton)
    contentView.addSubview(playButton)
    
    contentView.prepareForAutoLayout()
        .pinAll()
    
    settingsButton.prepareForAutoLayout()
        .pin(width: 100)
        .pin(height: 50)
        .pinLeft(constraintValue: 100)
        .pinTop(constraintValue: 500)
    
    playButton.prepareForAutoLayout()
        .pinTop(to: settingsButton, constraintValue: 50)
        .pinLeft(constraintValue: 200)
        .pinRight()
        .pin(height: 60)
}

GitHub

link
Stars: 0
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

Access control fix
2 weeks ago

Hotfix

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