diff --git a/Framework/LEEAlert/LEEAlert.xcodeproj/project.pbxproj b/Framework/LEEAlert/LEEAlert.xcodeproj/project.pbxproj index a3a7716..9bdfe5c 100644 --- a/Framework/LEEAlert/LEEAlert.xcodeproj/project.pbxproj +++ b/Framework/LEEAlert/LEEAlert.xcodeproj/project.pbxproj @@ -297,7 +297,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.3.9; + MARKETING_VERSION = 1.3.10; PRODUCT_BUNDLE_IDENTIFIER = com.lee.alert; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -325,7 +325,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.3.9; + MARKETING_VERSION = 1.3.10; PRODUCT_BUNDLE_IDENTIFIER = com.lee.alert; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/LEEAlert.podspec b/LEEAlert.podspec index d4c42c8..0bf1a61 100644 --- a/LEEAlert.podspec +++ b/LEEAlert.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "LEEAlert" -s.version = "1.3.9" +s.version = "1.3.10" s.summary = "优雅的Alert ActionSheet" s.homepage = "https://github.com/lixiang1994/LEEAlert" diff --git a/LEEAlert/LEEAlert.h b/LEEAlert/LEEAlert.h index cd391aa..fb46037 100644 --- a/LEEAlert/LEEAlert.h +++ b/LEEAlert/LEEAlert.h @@ -13,7 +13,7 @@ * * @author LEE * @copyright Copyright © 2016 - 2019年 lee. All rights reserved. - * @version V1.3.9 + * @version V1.3.10 */ #import diff --git a/LEEAlert/LEEAlert.m b/LEEAlert/LEEAlert.m index df6f51b..c70b9cc 100644 --- a/LEEAlert/LEEAlert.m +++ b/LEEAlert/LEEAlert.m @@ -13,7 +13,7 @@ * * @author LEE * @copyright Copyright © 2016 - 2019年 lee. All rights reserved. - * @version V1.3.9 + * @version V1.3.10 */ #import "LEEAlert.h" @@ -1245,11 +1245,11 @@ + (void)load{ - (void)lee_alert_updateCornerRadii{ if (!CornerRadiiEqualTo([self lee_alert_cornerRadii], CornerRadiiNull())) { - + CAShapeLayer *lastLayer = (CAShapeLayer *)self.layer.mask; - CGPathRef lastPath = lastLayer.path ? lastLayer.path : CGPathCreateMutable(); + CGPathRef lastPath = CGPathCreateCopy(lastLayer.path); CGPathRef path = LEECGPathCreateWithRoundedRect(self.bounds, [self lee_alert_cornerRadii]); - + // 防止相同路径多次设置 if (!CGPathEqualToPath(lastPath, path)) { // 移除原有路径动画 @@ -1269,9 +1269,12 @@ - (void)lee_alert_updateCornerRadii{ animation.toValue = (__bridge id _Nullable)(path); [maskLayer addAnimation:animation forKey:@"path"]; } - + } + CGPathRelease(lastPath); + + CGPathRelease(path); } } diff --git a/LEEAlert/LEEAlertHelper.h b/LEEAlert/LEEAlertHelper.h index c725994..c05c41c 100644 --- a/LEEAlert/LEEAlertHelper.h +++ b/LEEAlert/LEEAlertHelper.h @@ -13,7 +13,7 @@ * * @author LEE * @copyright Copyright © 2016 - 2019年 lee. All rights reserved. - * @version V1.3.9 + * @version V1.3.10 */ #ifndef LEEAlertHelper_h diff --git a/UPDATELOG.md b/UPDATELOG.md index bb83cdf..1c69e99 100644 --- a/UPDATELOG.md +++ b/UPDATELOG.md @@ -1,6 +1,10 @@ # LEEAlert - 更新日志 +V1.3.10 +============== +修复内存泄露 + V1.3.9 ============== 优化自定义视图内部处理 解决iOS10及以下添加AutoLayout布局的自定义视图显示异常的问题.