Releases: robb/Cartography
Five ways to Swift
Spit Shine
This release comes entirely from @corujautx
-
Discontinuation of the support for macOS < 10.10: The reason I did this is because Cartography 3.0 makes use of the
isActiveproperty on constraints and no longer has views to attach to a context like in previous versions, as those contained traversal of view hierarchy to identify where to attach a constraint as previous APIs did. It makes no sense to support 10.9 because Cartography is already targeted to iOS 8.0 onwards which supports this new API. This should "fix" #274. -
Extending support to NSLayoutGuide: A missing feature in the release of Cartography 3.0 was the support of
NSLayoutGuides in macOS. This is now supported! -
Improvements to insetting edges: I added a more expressive way to inset edges in expressions. The way you would currently do this would be expressing
view.edges == inset(view.superview!.edges, 10)which would now can also be expressed byview.edges == view.superview!.edges.inseted(by: 10)which makes a lot more expressive. -
Supporting other layout guides included in UIView:
UIViewalso includes references to other layout guides that are used to define standard layout margins or readable content margins. These now can be used in Cartography by expressing for example:view.edges == view.superview!.readableContentGuide.edges
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
Scrubbing up
Clear Seas Ahead
- @NachoSoto added full module optimization
- @JohnCoates fixed a Swift 3.0 compiler bug with setting priorities
- @strangeliu made "replaceGroup" an optional parameter
1.0.0 - Shippers Ahoy
- @raphaelcruzeiro has ported Cartography to Swift 3.0 - #228
0.7
0.6: Hard Choices
0.6: Hard Choices β1
- Removed the
layoutfunction. This is a breaking change and users are now required to invoke a layout pass manually as needed. (#144) - Compatibility with Swift 2.0
0.5: An Eternal Broken Build
- Compatibility with Swift 1.2. (#76)