In Swift 4, UILayoutPriority is a RawRepresentable instead of a Float, so passing numbers to the priority ~ operator no longer works out of the box.
This patch adds a function that takes a Float for the priority, and creates a UILayoutPriority from it. With this change, the Cartography DSL will stay compatible from Swift 3 to Swift 4.
In Swift 4, UILayoutPriority is a RawRepresentable instead of a Float, so passing numbers to the priority
~
operator no longer works out of the box.This patch adds a function that takes a Float for the priority, and creates a UILayoutPriority from it. With this change, the Cartography DSL will stay compatible from Swift 3 to Swift 4.
Fixes the issue I opened here: #270