VDLayout
Description
This repository provides a declarative way to laoyut
Example
view.add {
UIStackView.V {
UILabel().chain.text["1"]
UILabel().chain.text["2"]
UIButton().chain.titleLabel.text[""]
}
.chain
.alignment[.center]
.distribution[.equalSpacing]
.spacing[3]
.edges().equal(to: 0)
.width[8]
.widthToHeight(equal: 1 / 2)
}
Usage
TODO
Installation
Add the following line to your Podfile:
pod 'VDLayout'
and run pod update
from the podfile directory first.
Create a Package.swift
file.
// swift-tools-version:5.0
import PackageDescription
let package = Package(
name: "SomeProject",
dependencies: [
.package(url: "https://github.com/dankinsoid/VDLayout.git", from: "1.21.0")
],
targets: [
.target(name: "SomeProject", dependencies: ["VDLayout"])
]
)
$ swift build
Author
dankinsoid, [email protected]
License
VDLayout is available under the MIT license. See the LICENSE file for more info.