mirror of https://github.com/SnapKit/SnapKit
Fix OS X compiles
This commit is contained in:
parent
51662d58bb
commit
d9424975d4
|
@ -391,7 +391,7 @@ private extension NSLayoutAttribute {
|
||||||
case .Trailing, .TrailingMargin: return point.x
|
case .Trailing, .TrailingMargin: return point.x
|
||||||
case .Width, .Height, .NotAnAttribute: return CGFloat(0)
|
case .Width, .Height, .NotAnAttribute: return CGFloat(0)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
switch self {
|
switch self {
|
||||||
case .Left, .CenterX: return point.x
|
case .Left, .CenterX: return point.x
|
||||||
case .Top, .CenterY, .Baseline: return point.y
|
case .Top, .CenterY, .Baseline: return point.y
|
||||||
|
@ -415,14 +415,14 @@ private extension NSLayoutAttribute {
|
||||||
case .Trailing, .TrailingMargin: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left
|
case .Trailing, .TrailingMargin: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left
|
||||||
case .Width, .Height, .NotAnAttribute: return CGFloat(0)
|
case .Width, .Height, .NotAnAttribute: return CGFloat(0)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
switch self {
|
switch self {
|
||||||
case .Left, .CenterX: return insets.left
|
case .Left, .CenterX: return insets.left
|
||||||
case .Top, .CenterY, .Baseline: return insets.top
|
case .Top, .CenterY, .Baseline: return insets.top
|
||||||
case .Right: return insets.right
|
case .Right: return insets.right
|
||||||
case .Bottom: return insets.bottom
|
case .Bottom: return insets.bottom
|
||||||
case .Leading, .LeadingMargin: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.left : -insets.right
|
case .Leading: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.left : -insets.right
|
||||||
case .Trailing, .TrailingMargin: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left
|
case .Trailing: return (Config.interfaceLayoutDirection == .LeftToRight) ? insets.right : -insets.left
|
||||||
case .Width, .Height, .NotAnAttribute: return CGFloat(0)
|
case .Width, .Height, .NotAnAttribute: return CGFloat(0)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue