From 5afd216e216c7b855b829ec6837119d6184d9d73 Mon Sep 17 00:00:00 2001 From: Ben Jones Date: Wed, 24 Jun 2015 15:10:38 -0700 Subject: [PATCH] Handle new NSLayoutAttribute FirstBaseline that is introduced in OS X 10.11 for CGPoint or EdgeInsets --- Source/Constraint.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Constraint.swift b/Source/Constraint.swift index 6579f68..f4b6ed2 100644 --- a/Source/Constraint.swift +++ b/Source/Constraint.swift @@ -406,7 +406,7 @@ private extension NSLayoutAttribute { case .Leading: return point.x case .Trailing: return point.x case .Width, .Height, .NotAnAttribute: return CGFloat(0) - default: return CGFloat(0) + case .FirstBaseline: return point.y } #endif } @@ -431,7 +431,7 @@ private extension NSLayoutAttribute { case .Leading: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.left : -insets.right case .Trailing: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left case .Width, .Height, .NotAnAttribute: return CGFloat(0) - default: return CGFloat(0) + case .FirstBaseline: return insets.bottom } #endif }