mirror of https://github.com/SnapKit/SnapKit
Add availability check for iOS 8 attributes.
This commit is contained in:
parent
1754ffd536
commit
8e6219ef86
|
@ -125,32 +125,34 @@ internal struct ConstraintAttributes: OptionSetType, BooleanType {
|
||||||
attrs.append(.Baseline)
|
attrs.append(.Baseline)
|
||||||
}
|
}
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
if (self.contains(ConstraintAttributes.FirstBaseline)) {
|
if #available(iOS 8.0, *) {
|
||||||
attrs.append(.FirstBaseline)
|
if (self.contains(ConstraintAttributes.FirstBaseline)) {
|
||||||
}
|
attrs.append(.FirstBaseline)
|
||||||
if (self.contains(ConstraintAttributes.LeftMargin)) {
|
}
|
||||||
attrs.append(.LeftMargin)
|
if (self.contains(ConstraintAttributes.LeftMargin)) {
|
||||||
}
|
attrs.append(.LeftMargin)
|
||||||
if (self.contains(ConstraintAttributes.RightMargin)) {
|
}
|
||||||
attrs.append(.RightMargin)
|
if (self.contains(ConstraintAttributes.RightMargin)) {
|
||||||
}
|
attrs.append(.RightMargin)
|
||||||
if (self.contains(ConstraintAttributes.TopMargin)) {
|
}
|
||||||
attrs.append(.TopMargin)
|
if (self.contains(ConstraintAttributes.TopMargin)) {
|
||||||
}
|
attrs.append(.TopMargin)
|
||||||
if (self.contains(ConstraintAttributes.BottomMargin)) {
|
}
|
||||||
attrs.append(.BottomMargin)
|
if (self.contains(ConstraintAttributes.BottomMargin)) {
|
||||||
}
|
attrs.append(.BottomMargin)
|
||||||
if (self.contains(ConstraintAttributes.LeadingMargin)) {
|
}
|
||||||
attrs.append(.LeadingMargin)
|
if (self.contains(ConstraintAttributes.LeadingMargin)) {
|
||||||
}
|
attrs.append(.LeadingMargin)
|
||||||
if (self.contains(ConstraintAttributes.TrailingMargin)) {
|
}
|
||||||
attrs.append(.TrailingMargin)
|
if (self.contains(ConstraintAttributes.TrailingMargin)) {
|
||||||
}
|
attrs.append(.TrailingMargin)
|
||||||
if (self.contains(ConstraintAttributes.CenterXWithinMargins)) {
|
}
|
||||||
attrs.append(.CenterXWithinMargins)
|
if (self.contains(ConstraintAttributes.CenterXWithinMargins)) {
|
||||||
}
|
attrs.append(.CenterXWithinMargins)
|
||||||
if (self.contains(ConstraintAttributes.CenterYWithinMargins)) {
|
}
|
||||||
attrs.append(.CenterYWithinMargins)
|
if (self.contains(ConstraintAttributes.CenterYWithinMargins)) {
|
||||||
|
attrs.append(.CenterYWithinMargins)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return attrs
|
return attrs
|
||||||
|
|
Loading…
Reference in New Issue