Swiftpack.co -  OrkhanAlikhanov/LayoutSwift as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
OrkhanAlikhanov/LayoutSwift
LayoutSwift - Yet another Swift Autolayout DSL for iOS
.package(url: "https://github.com/OrkhanAlikhanov/LayoutSwift.git", from: "1.0.1")

License

LayoutSwift 📐

Yet another Swift Autolayout DSL for iOS

Extracted from my work at CosmicMind/Material and updated.

Usage

override func viewDidLoad() {
  super.viewDidLoad()

  view.layout(logoView)
    .topMargin()
    .centerX()
    .height(100)
  
  view.layout(titleLabel)
    .centerX()
    .widthMargin()
    .below(logoView, 16)
}

For details, refer to the PRs for docs:

Other works

  • ChainSwift - ChainSwift 🔗 is an extension that provides chainable way of setting properties.
  • SwiftUIRouter - An experimental navigation router for SwiftUI

Installation

Swift Package Manager

Note: Instructions below are for using SwiftPM without the Xcode UI. It's the easiest to go to your Project Settings -> Swift Packages and add LayoutSwift from there.

To integrate using Apple's Swift Package Manager , without Xcode integration, add the following as a dependency to your Package.swift:

dependencies: [
  .package(url: "https://github.com/OrkhanAlikhanov/LayoutSwift.git", .upToNextMajor(from: "1.0.0"))
]

and then specify "LayoutSwift" as a dependency of the Target in which you wish to use LayoutSwift.

Manually

Just drag and drop the files in the Sources folder.

Authors

See also the list of contributors who participated in this project.

Love our work?

Hit the star 🌟 button! It helps! ❤️

License

This project is licensed under the MIT License - see the LICENSE file for details

GitHub

link
Stars: 1
Last commit: 3 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.

Release Notes

v1.0.1
3 weeks ago

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