robb/Cartography

UILayoutPriority is no longer a number, it is a RawRepresentable

Closed this issue · 3 comments

After updating to Swift 4, the priority operator ~ no longer works with doubles and integers, since UILayoutPriority is a RawRepresentable now. This breaks many constraints defined using Cartography, and requires writing this unwieldy kind of constraint view.bottom == sv.bottom ~ LayoutPriority(rawValue: 900.0).

It would be great if func ~ accepted integers and doubles in order to work around this.

I've submitted a PR that adds this: #271

This can be closed now? :)

orta commented

Yep 👍