Browse Source

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

* Add support for UILayoutPriority as priority target.

* Fixed for tvOS
Benjamin Chrobot 8 years ago
parent
commit
a07ef8b04c
1 changed files with 10 additions and 0 deletions
  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