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)
|
||||
}
|
||||
#if os(iOS)
|
||||
if #available(iOS 8.0, *) {
|
||||
if (self.contains(ConstraintAttributes.FirstBaseline)) {
|
||||
attrs.append(.FirstBaseline)
|
||||
}
|
||||
|
@ -152,6 +153,7 @@ internal struct ConstraintAttributes: OptionSetType, BooleanType {
|
|||
if (self.contains(ConstraintAttributes.CenterYWithinMargins)) {
|
||||
attrs.append(.CenterYWithinMargins)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return attrs
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue