ViewLayout is an UIView-associated manager for anchors, using layout guides to resolve constraints.
Swift Package Manager
ViewLayout package to the dependencies within your application’s
Package.swift file. Substitute
"x.x.x" with the latest
.package(url: "https://github.com/bogue89/ViewLayoutPackage.git", from: "x.x.x")
ViewLayout to your target’s dependencies:
.target(name: "example", dependencies: ["ViewLayout"]),
let view = UIView() let layout: ViewLayout = view.layout // this lazily initialize the ViewLayout manager for this view instance
The latest version of ViewLayout requires Swift 5.0 or later. You can download this version of the Swift binaries by following this link. iOS v.11 is required for anchoring layout composition.