Skip to content

Commit

Permalink
1.3.10 修复内存泄露
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiang1994 committed Apr 27, 2020
1 parent 167ec48 commit 2382882
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Framework/LEEAlert/LEEAlert.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion LEEAlert.podspec
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion LEEAlert/LEEAlert.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author LEE
* @copyright Copyright © 2016 - 2019年 lee. All rights reserved.
* @version V1.3.9
* @version V1.3.10
*/

#import <Foundation/Foundation.h>
Expand Down
13 changes: 8 additions & 5 deletions LEEAlert/LEEAlert.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)) {
// 移除原有路径动画
Expand All @@ -1269,9 +1269,12 @@ - (void)lee_alert_updateCornerRadii{
animation.toValue = (__bridge id _Nullable)(path);
[maskLayer addAnimation:animation forKey:@"path"];
}

}

CGPathRelease(lastPath);

CGPathRelease(path);
}

}
Expand Down
2 changes: 1 addition & 1 deletion LEEAlert/LEEAlertHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions UPDATELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

# LEEAlert - 更新日志

V1.3.10
==============
修复内存泄露

V1.3.9
==============
优化自定义视图内部处理 解决iOS10及以下添加AutoLayout布局的自定义视图显示异常的问题.
Expand Down

0 comments on commit 2382882

Please sign in to comment.