|
@@ -78,6 +78,9 @@
|
|
__unused MASAttribute anyAttribute = (MASAttributeLeft | MASAttributeRight | MASAttributeTop | MASAttributeBottom | MASAttributeLeading
|
|
__unused MASAttribute anyAttribute = (MASAttributeLeft | MASAttributeRight | MASAttributeTop | MASAttributeBottom | MASAttributeLeading
|
|
| MASAttributeTrailing | MASAttributeWidth | MASAttributeHeight | MASAttributeCenterX
|
|
| MASAttributeTrailing | MASAttributeWidth | MASAttributeHeight | MASAttributeCenterX
|
|
| MASAttributeCenterY | MASAttributeBaseline
|
|
| MASAttributeCenterY | MASAttributeBaseline
|
|
|
|
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
|
|
|
|
+ | MASAttributeFirstBaseline | MASAttributeLastBaseline
|
|
|
|
+#endif
|
|
#if TARGET_OS_IPHONE || TARGET_OS_TV
|
|
#if TARGET_OS_IPHONE || TARGET_OS_TV
|
|
| MASAttributeLeftMargin | MASAttributeRightMargin | MASAttributeTopMargin | MASAttributeBottomMargin
|
|
| MASAttributeLeftMargin | MASAttributeRightMargin | MASAttributeTopMargin | MASAttributeBottomMargin
|
|
| MASAttributeLeadingMargin | MASAttributeTrailingMargin | MASAttributeCenterXWithinMargins
|
|
| MASAttributeLeadingMargin | MASAttributeTrailingMargin | MASAttributeCenterXWithinMargins
|
|
@@ -101,6 +104,13 @@
|
|
if (attrs & MASAttributeCenterY) [attributes addObject:self.view.mas_centerY];
|
|
if (attrs & MASAttributeCenterY) [attributes addObject:self.view.mas_centerY];
|
|
if (attrs & MASAttributeBaseline) [attributes addObject:self.view.mas_baseline];
|
|
if (attrs & MASAttributeBaseline) [attributes addObject:self.view.mas_baseline];
|
|
|
|
|
|
|
|
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
|
|
|
|
+
|
|
|
|
+ if (attrs & MASAttributeFirstBaseline) [attributes addObject:self.view.mas_firstBaseline];
|
|
|
|
+ if (attrs & MASAttributeLastBaseline) [attributes addObject:self.view.mas_lastBaseline];
|
|
|
|
+
|
|
|
|
+#endif
|
|
|
|
+
|
|
#if TARGET_OS_IPHONE || TARGET_OS_TV
|
|
#if TARGET_OS_IPHONE || TARGET_OS_TV
|
|
|
|
|
|
if (attrs & MASAttributeLeftMargin) [attributes addObject:self.view.mas_leftMargin];
|
|
if (attrs & MASAttributeLeftMargin) [attributes addObject:self.view.mas_leftMargin];
|
|
@@ -182,6 +192,19 @@
|
|
};
|
|
};
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (__TV_OS_VERSION_MIN_REQUIRED >= 9000) || (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
|
|
|
|
+
|
|
|
|
+- (MASConstraint *)firstBaseline {
|
|
|
|
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeFirstBaseline];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+- (MASConstraint *)lastBaseline {
|
|
|
|
+ return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLastBaseline];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
+
|
|
#if TARGET_OS_IPHONE || TARGET_OS_TV
|
|
#if TARGET_OS_IPHONE || TARGET_OS_TV
|
|
|
|
|
|
- (MASConstraint *)leftMargin {
|
|
- (MASConstraint *)leftMargin {
|