Explorar o código

Add support for UILayoutPriority as priority target. (#466)

* Add support for UILayoutPriority as priority target.

* Fixed for tvOS
Benjamin Chrobot %!s(int64=8) %!d(string=hai) anos
pai
achega
a07ef8b04c
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      Source/ConstraintPriorityTarget.swift

+ 10 - 0
Source/ConstraintPriorityTarget.swift

@@ -73,3 +73,13 @@ extension CGFloat: ConstraintPriorityTarget {
     }
     
 }
+
+#if os(iOS) || os(tvOS)
+extension UILayoutPriority: ConstraintPriorityTarget {
+
+    public var constraintPriorityTargetValue: Float {
+        return self.rawValue
+    }
+
+}
+#endif