Handle new NSLayoutAttribute FirstBaseline that is introduced in OS X 10.11 for CGPoint or EdgeInsets

This commit is contained in:
Ben Jones 2015-06-24 15:10:38 -07:00
parent ee3e1283fd
commit c2eae8e90a
1 changed files with 2 additions and 2 deletions

View File

@ -400,7 +400,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
}
@ -425,7 +425,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
}