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