Skip to content

Scrubbing the Decks

Compare
Choose a tag to compare
@orta orta released this 31 Oct 12:25
· 51 commits to master since this release

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