mirror of https://github.com/SnapKit/SnapKit
Merge pull request #28 from devxoul/patch-1
Add platform check for additional constraints attributes.
This commit is contained in:
commit
e723c0c8a7
|
@ -116,6 +116,7 @@ internal struct ConstraintAttributes: RawOptionSetType, BooleanType {
|
|||
if (self & ConstraintAttributes.Baseline) {
|
||||
attrs.append(.Baseline)
|
||||
}
|
||||
#if os(ios)
|
||||
if (self & ConstraintAttributes.FirstBaseline) {
|
||||
attrs.append(.FirstBaseline)
|
||||
}
|
||||
|
@ -143,6 +144,7 @@ internal struct ConstraintAttributes: RawOptionSetType, BooleanType {
|
|||
if (self & ConstraintAttributes.CenterYWithinMargins) {
|
||||
attrs.append(.CenterYWithinMargins)
|
||||
}
|
||||
#endif
|
||||
return attrs
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue