Releases: Rightpoint/Anchorage
Releases · Rightpoint/Anchorage
4.0
Anchorage 4 adds a new batching API for creating multiple constraints, with the ability to return inactive constraints if you need them. It also improves the API in many places, restructures the code to be more maintainable, and drops Swift 2.3 support. See the ReadMe for a full rundown of the current feature set.
New Features
- Batching: any constraints created in the batch will not be activated until the whole batch returns. Optionally, you can write
batch(active: false) { ... }
to get back inactive constraints with Auto Layout's batch-activation mechanism. - Added
sizeAnchors
: you can now pin a view's size to a literalCGSize
or another view's size anchors in a single line of code. - Added support for using
(UI/NS)EdgeInsets
when constraining edge anchors; useful for margins when not usinglayoutMarginsGuide
.
Improvements
- Expanded and improved the use of layout priority shorthand enum from #33. This is now the preferred way to adjust priority in Anchorage.
- Added tests
Breaking Changes
- dropped Swift 2.3 support
- minor changes that may make some priority-related code fail to compile. This code should be converted to the much more concise new shorthand syntax; see the ReadMe for details.
- the following have been renamed:
AxisGroup
→ConstraintPair
EdgeGroup
→ConstraintGroup
LayoutPriority
→Priority
Bug fixes
- Fixed copy/paste errors that resulted in incorrect constraints being created (9891570)
3.2.0
3.1.0
- Priority operator precedence adjusted so that parens aren't required for most expressions
- Anchorage now supports OS X thanks to @mattprowse !
Swift 3 Compatibility
Anchorage now supports both Swift 2.3 and Swift 3
2.0.1
Initial Release
1.0.0