From 3698c13aba988cd3e41b91b255e1c682c057e565 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期四, 23 三月 2023 11:49:58 +0800 Subject: [PATCH] 1.新增历史记录相关页面及功能 2.修改配网为热点配网 3.设备列表增加过滤门锁功能 4.增加添加设备通知功能 --- 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