From 78532736a9223d02519db6608a46da335ec7a0fe Mon Sep 17 00:00:00 2001 From: Alexander Grebenyuk Date: Wed, 15 Nov 2017 13:14:47 +0300 Subject: [PATCH] Vertion 0.3 --- CHANGELOG.md | 39 ++++++++++++++++++++++++++++++++++++++- Supporting/Info.plist | 2 +- Yalta.podspec | 2 +- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65447b7..af6c1bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,42 @@ [Changelog](https://github.com/kean/Yale/releases) for all versions + +## Yalta 0.3 + +- With new `addSubview(_:constraints:)` method you define a view hierarchy and layout views at the same time. It encourages splitting layout code into logical blocks and prevents programmer errors (e.g. trying to add constraints to views not in view hierarchy). + +- Remove standalone `fillSuperview(..)` and `centerInSuperview()` family of functions. There were multiple cons of having them (e.g. more terminology to learn, hard to document and explain, inconsistent with `center` and `size` manipulations, were not allowing to pin in a corner). + +Now you can manipulate multiple edges at the same time instead: + +```swift +view.addSubview(stack) { + $0.edges.pinToSuperview() // pins the edges to fill the superview + $0.edges.pinToSuperview(insets: Insets(10)) // with insets + $0.edges.pinToSuperviewMargins() // or margins + + $0.edges(.left, .right).pinToSuperview() // fill along horizontal axis + $0.centerY.alignWithSuperview() // center along vertical axis +} +``` + +This is a much simpler model which removes entire layer of standalone methods available on `LayoutItems`. Now you always select either an `anchor` or `collections of anchors`, then use their methods to add constraints. Much simpler. + +- Make LayoutProxy's `base` public to enable adding custom extensions on top of it. + + +# Yalta 0.2 + +- Redesigned Yalta API which now follow [Swift API Design Guidelines](https://swift.org/documentation/api-design-guidelines/). Although most of the APIs are compact, it is a *non-goal* to enable the most concise syntax possible. Instead Yalta provides a fluent APIs that form grammatical phrases. +- Full test coverage +- Add a new comprehensive overview, [full guide](https://github.com/kean/Yalta/blob/master/Docs/YaltaGuide.md), and [installation guide](https://github.com/kean/Yalta/blob/master/Docs/InstallationGuide.md) + + +## Yalta 0.1.1 + +- Revert to original `Spacer` design + + ## Yalta 0.1 -- Initial version \ No newline at end of file +- Initial version diff --git a/Supporting/Info.plist b/Supporting/Info.plist index 11d7458..9d45612 100644 --- a/Supporting/Info.plist +++ b/Supporting/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.1 + 0.3 CFBundleSignature ???? CFBundleVersion diff --git a/Yalta.podspec b/Yalta.podspec index 40772bd..96cc2e8 100644 --- a/Yalta.podspec +++ b/Yalta.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Yalta" - s.version = "0.1" + s.version = "0.3" s.summary = "Auto Layout for Humans" s.homepage = "https://github.com/kean/Yalta"