From d56c8422138cd82d2ea9bed8e2f4b0bc7766be4b Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 02 三月 2021 15:38:32 +0800
Subject: [PATCH] 2021-03-02 1.最近新云端接口
---
Demo/EZOpensdk_iOS_4.15.1_build20201104/Demo/EZOpenSDKDemo/Venders/Masonry/MASViewConstraint.m | 40 ++++++++++++++++++++++------------------
1 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/Demo/EZOpensdk_iOS_4.15.1_build20201104/Demo/EZOpenSDKDemo/Venders/Masonry/MASViewConstraint.m b/Demo/EZOpensdk_iOS_4.15.1_build20201104/Demo/EZOpenSDKDemo/Venders/Masonry/MASViewConstraint.m
old mode 100644
new mode 100755
index b0f3650..173eec1
--- a/Demo/EZOpensdk_iOS_4.15.1_build20201104/Demo/EZOpenSDKDemo/Venders/Masonry/MASViewConstraint.m
+++ b/Demo/EZOpensdk_iOS_4.15.1_build20201104/Demo/EZOpenSDKDemo/Venders/Masonry/MASViewConstraint.m
@@ -1,5 +1,5 @@
//
-// MASConstraint.m
+// MASViewConstraint.m
// Masonry
//
// Created by Jonas Budelmann on 20/07/13.
@@ -86,7 +86,7 @@
- (void)setLayoutConstant:(CGFloat)layoutConstant {
_layoutConstant = layoutConstant;
-#if TARGET_OS_MAC && !TARGET_OS_IPHONE
+#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)
if (self.useAnimator) {
[self.layoutConstraint.animator setConstant:layoutConstant];
} else {
@@ -175,6 +175,7 @@
NSMutableArray *children = NSMutableArray.new;
for (id attr in attribute) {
MASViewConstraint *viewConstraint = [self copy];
+ viewConstraint.layoutRelation = relation;
viewConstraint.secondViewAttribute = attr;
[children addObject:viewConstraint];
}
@@ -211,7 +212,7 @@
#pragma mark - Animator proxy
-#if TARGET_OS_MAC && !TARGET_OS_IPHONE
+#if TARGET_OS_MAC && !(TARGET_OS_IPHONE || TARGET_OS_TV)
- (MASConstraint *)animator {
self.useAnimator = YES;
@@ -253,6 +254,10 @@
}
}
+- (void)setInset:(CGFloat)inset {
+ [self setInsets:(MASEdgeInsets){.top = inset, .left = inset, .bottom = inset, .right = inset}];
+}
+
- (void)setOffset:(CGFloat)offset {
self.layoutConstant = offset;
}
@@ -288,28 +293,21 @@
#pragma mark - MASConstraint
- (void)activate {
- if ([self supportsActiveProperty] && self.layoutConstraint) {
- if (self.hasBeenInstalled) {
- return;
- }
- self.layoutConstraint.active = YES;
- [self.firstViewAttribute.view.mas_installedConstraints addObject:self];
- } else {
- [self install];
- }
+ [self install];
}
- (void)deactivate {
- if ([self supportsActiveProperty]) {
- self.layoutConstraint.active = NO;
- [self.firstViewAttribute.view.mas_installedConstraints removeObject:self];
- } else {
- [self uninstall];
- }
+ [self uninstall];
}
- (void)install {
if (self.hasBeenInstalled) {
+ return;
+ }
+
+ if ([self supportsActiveProperty] && self.layoutConstraint) {
+ self.layoutConstraint.active = YES;
+ [self.firstViewAttribute.view.mas_installedConstraints addObject:self];
return;
}
@@ -387,6 +385,12 @@
}
- (void)uninstall {
+ if ([self supportsActiveProperty]) {
+ self.layoutConstraint.active = NO;
+ [self.firstViewAttribute.view.mas_installedConstraints removeObject:self];
+ return;
+ }
+
[self.installedView removeConstraint:self.layoutConstraint];
self.layoutConstraint = nil;
self.installedView = nil;
--
Gitblit v1.8.0