Scrubbing the Decks
Now you can pass in layout guides to constrain
- so code like:
constrain(view) { view in
view.top == vc.topLayoutGuideCartography
}
should change to:
constrain(view, vc.car_topLayoutGuide) { view, guide in
view.top == guide.bottom
}
This adds more flexibility as you can also now constrain to the top/height attributes of an UILayoutSupport
.
The whole idea for 3.0 is to unify UIView
(or NSView
in macOS), UILayoutGuide
and UILayoutSupport
as constrainable elements, represented by the protocol LayoutElement
. 👍
The credit goes to @corujautx