VDLayout 1.21.0

VDLayout 1.21.0

Maintained by dankinsoid.



 
Depends on:
ConstraintsOperators>= 0
VD>= 0
RxSwift~> 5.0
RxCocoa~> 5.0
 

VDLayout 1.21.0

  • By
  • Voidilov

VDLayout

CI Status Version License Platform

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

  1. CocoaPods

Add the following line to your Podfile:

pod 'VDLayout'

and run pod update from the podfile directory first.

  1. Swift Package Manager

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.