From a07ef8b04c65faacc74974b38b396b52e001a735 Mon Sep 17 00:00:00 2001 From: Benjamin Chrobot Date: Fri, 13 Oct 2017 05:32:30 -0400 Subject: [PATCH] Add support for UILayoutPriority as priority target. (#466) * Add support for UILayoutPriority as priority target. * Fixed for tvOS --- Source/ConstraintPriorityTarget.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/ConstraintPriorityTarget.swift b/Source/ConstraintPriorityTarget.swift index eb32f79..064f750 100644 --- a/Source/ConstraintPriorityTarget.swift +++ b/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