From 0caa2613baeaf118def5429702eca3e0347089c1 Mon Sep 17 00:00:00 2001 From: LEE <18611401994@163.com> Date: Fri, 3 Sep 2021 12:59:42 +0800 Subject: [PATCH] =?UTF-8?q?1.5.1=20=E4=BF=AE=E5=A4=8D`[LEEAlert=20clearQue?= =?UTF-8?q?ue]`=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LEEAlert/LEEAlert.xcodeproj/project.pbxproj | 4 ++-- LEEAlert.podspec | 2 +- LEEAlert/LEEAlert.h | 2 +- LEEAlert/LEEAlert.m | 17 ++++++++++++++++- LEEAlert/LEEAlertHelper.h | 2 +- UPDATELOG.md | 5 +++++ 6 files changed, 26 insertions(+), 6 deletions(-) diff --git a/Framework/LEEAlert/LEEAlert.xcodeproj/project.pbxproj b/Framework/LEEAlert/LEEAlert.xcodeproj/project.pbxproj index 03cd953..aac39fc 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.5.0; + MARKETING_VERSION = 1.5.1; 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.5.0; + MARKETING_VERSION = 1.5.1; PRODUCT_BUNDLE_IDENTIFIER = com.lee.alert; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/LEEAlert.podspec b/LEEAlert.podspec index 35d17e1..2ad9601 100644 --- a/LEEAlert.podspec +++ b/LEEAlert.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "LEEAlert" -s.version = "1.5.0" +s.version = "1.5.1" s.summary = "优雅的Alert ActionSheet" s.homepage = "https://github.com/lixiang1994/LEEAlert" diff --git a/LEEAlert/LEEAlert.h b/LEEAlert/LEEAlert.h index f5816e4..df2d46d 100644 --- a/LEEAlert/LEEAlert.h +++ b/LEEAlert/LEEAlert.h @@ -12,7 +12,7 @@ * * @author LEE * @copyright Copyright © 2016 - 2020年 lee. All rights reserved. - * @version V1.4.3 + * @version V1.5.1 */ #import diff --git a/LEEAlert/LEEAlert.m b/LEEAlert/LEEAlert.m index 93cd079..ebe7981 100644 --- a/LEEAlert/LEEAlert.m +++ b/LEEAlert/LEEAlert.m @@ -12,7 +12,7 @@ * * @author LEE * @copyright Copyright © 2016 - 2020年 lee. All rights reserved. - * @version V1.4.3 + * @version V1.5.1 */ #import "LEEAlert.h" @@ -1014,8 +1014,13 @@ + (void)continueQueueDisplay{ } + (void)clearQueue{ + if ([self isQueueEmpty]) return; + + LEEBaseConfig * _Nullable last = [LEEAlert shareManager].queueArray.lastObject; [[LEEAlert shareManager].queueArray removeAllObjects]; + + if ([last respondsToSelector:@selector(close)]) [last performSelector:@selector(close)]; } + (BOOL)isQueueEmpty{ @@ -3691,6 +3696,8 @@ - (UIView *)actionSheetView{ @interface LEEBaseConfig () +@property (nonatomic, assign) BOOL isShowing; + - (void)show; @end @@ -3708,6 +3715,8 @@ - (nonnull instancetype)init if (self) { + self.isShowing = NO; + __weak typeof(self) weakSelf = self; self.config.modelFinishConfig = ^{ @@ -3778,6 +3787,8 @@ - (void)show{ } [[LEEAlert shareManager].leeWindow makeKeyAndVisible]; + + self.isShowing = YES; } if ([self.config.modelPresentation isKindOfClass:LEEPresentationViewController.class]) { @@ -3799,6 +3810,8 @@ - (void)show{ [LEEAlert shareManager].viewController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; [[LEEAlert shareManager].viewController didMoveToParentViewController:presentation.viewController]; + + self.isShowing = YES; } __weak typeof(self) weakSelf = self; @@ -3833,6 +3846,8 @@ - (void)show{ - (void)close{ + if (!self.isShowing) return; + if ([self.config.modelPresentation isKindOfClass:LEEPresentationWindow.class]) { [LEEAlert shareManager].leeWindow.hidden = YES; diff --git a/LEEAlert/LEEAlertHelper.h b/LEEAlert/LEEAlertHelper.h index 389c526..4f5d6aa 100644 --- a/LEEAlert/LEEAlertHelper.h +++ b/LEEAlert/LEEAlertHelper.h @@ -13,7 +13,7 @@ * * @author LEE * @copyright Copyright © 2016 - 2020年 lee. All rights reserved. - * @version V1.4.3 + * @version V1.5.1 */ #ifndef LEEAlertHelper_h diff --git a/UPDATELOG.md b/UPDATELOG.md index 5cdec40..331a277 100644 --- a/UPDATELOG.md +++ b/UPDATELOG.md @@ -1,6 +1,11 @@ # LEEAlert - 更新日志 +V1.5.1 +============== +修复`[LEEAlert clearQueue]`问题 + + V1.5.0 ============== 移除`.LeeWindowLevel(UIWindowLevel)`设置