A simple Auto Layout wrapper - write readable layouts!
label.top(10).left(5).right(20).bottom()tableView.pin()
scrollView.pin(10)label.topAnchor ~ customView.bottomAnchor + 7.0
label.leftAnchor ~ customView.leftAnchor + 15.0
label.rightAnchor ~ customView.rightAnchor - 4.0label.pin([.top(7): .bottom, .left(15): .left, .right(4): .right], to: customView)@Layouting var switcher = UISwitch()
@Layouting var label = UILabel()
@Layouting var button = UIButton()
switcher.centerY().left(8)
label.centerY().centerX()
button
.left(to: .right(20), of: label)
.top(to: switcher)
.right(24)collectionView.left().right().safeArea { $0.top().bottom(10) }The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler.
Just add AiryLayout in your Package.swift as a dependency:
dependencies: [
.package(url: "https://github.com/kabyshev/AiryLayout.git", .upToNextMajor(from: "1.0.0"))
]If you prefer not to use SPM, you can integrate AiryLayout into your project manually: add Sources folder to your project.
