robb / Cartography

A declarative Auto Layout DSL for Swift :iphone::triangular_ruler:
Other
7.35k stars 525 forks source link

Array support to `distribute` and `align` methods #247

Closed corujautx closed 7 years ago

corujautx commented 7 years ago

I added overloads to both distribute and align methods in order to support arrays of LayoutProxy so we can handle views to align dynamically instead of having to declare each one as mentioned in issues #155 and #193, and set up default values to distribute to quickly place views with zero spacing between them.

I also added these changes for those who want to use with Swift 2.3 in a branch within my fork.

orta commented 7 years ago

Do you know if these are covered by existing tests? OR should I be bugging you to add some? :D

corujautx commented 7 years ago

I added four more tests, all of them covering the cases in which no constraint should be returned when the array contains a single or no instance of LayoutProxy.

orta commented 7 years ago

Awesome 👍

ninjudd commented 7 years ago

Is there a release on CocoaPods with this update?

orta commented 7 years ago

yep, just shipped in 1.1.0 now