From a3fec2835647a7c215cdaf0077e30cc1131c19b4 Mon Sep 17 00:00:00 2001 From: LEE <18611401994@163.com> Date: Thu, 27 Oct 2022 17:34:25 +0800 Subject: [PATCH] 1.6.2 --- LEEAlert.podspec | 2 +- LEEAlert/LEEAlert.h | 2 +- LEEAlert/LEEAlert.m | 38 ++++++++++++++++++++++++++++---------- LEEAlert/LEEAlertHelper.h | 2 +- UPDATELOG.md | 4 ++++ 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/LEEAlert.podspec b/LEEAlert.podspec index 6b8e76a..716dbf5 100644 --- a/LEEAlert.podspec +++ b/LEEAlert.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "LEEAlert" -s.version = "1.6.1" +s.version = "1.6.2" s.summary = "优雅的Alert ActionSheet" s.homepage = "https://github.com/lixiang1994/LEEAlert" diff --git a/LEEAlert/LEEAlert.h b/LEEAlert/LEEAlert.h index 671ebe0..7d8bcb1 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.6.1 + * @version V1.6.2 */ #import diff --git a/LEEAlert/LEEAlert.m b/LEEAlert/LEEAlert.m index ca9aac9..9d1c0f8 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.6.1 + * @version V1.6.2 */ #import "LEEAlert.h" @@ -2820,12 +2820,17 @@ - (void)buttonAction:(LEEActionButton *)sender{ if (isClose) { - if (self.config.modelShouldActionClickClose && !self.config.modelShouldActionClickClose(index)) return; - - [self closeAnimationsWithCompletionBlock:^{ + if (self.config.modelShouldActionClickClose && self.config.modelShouldActionClickClose(index)) { + + [self closeAnimationsWithCompletionBlock:^{ + + if (clickBlock) clickBlock(); + }]; + + } else { if (clickBlock) clickBlock(); - }]; + } } else { @@ -3701,12 +3706,17 @@ - (void)buttonAction:(LEEActionButton *)sender{ if (isClose) { - if (self.config.modelShouldActionClickClose && !self.config.modelShouldActionClickClose(index)) return; - - [self closeAnimationsWithCompletionBlock:^{ + if (self.config.modelShouldActionClickClose && self.config.modelShouldActionClickClose(index)) { + + [self closeAnimationsWithCompletionBlock:^{ + + if (clickBlock) clickBlock(); + }]; + + } else { if (clickBlock) clickBlock(); - }]; + } } else { @@ -4080,6 +4090,10 @@ - (void)show{ if (@available(iOS 13.0, *)) { [LEEAlert shareManager].leeWindow.overrideUserInterfaceStyle = self.config.modelUserInterfaceStyle; + } + + if (@available(iOS 16.0, *)) { + } else { [[LEEAlert shareManager].leeWindow makeKeyAndVisible]; } @@ -4148,7 +4162,11 @@ - (void)close{ [LEEAlert shareManager].leeWindow.hidden = YES; - [[LEEAlert shareManager].leeWindow resignKeyWindow]; + if (@available(iOS 16.0, *)) { + + } else { + [[LEEAlert shareManager].leeWindow resignKeyWindow]; + } [LEEAlert shareManager].leeWindow.rootViewController = nil; } diff --git a/LEEAlert/LEEAlertHelper.h b/LEEAlert/LEEAlertHelper.h index a15224d..4faed50 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.6.1 + * @version V1.6.2 */ #ifndef LEEAlertHelper_h diff --git a/UPDATELOG.md b/UPDATELOG.md index 86f99ab..c9e5129 100644 --- a/UPDATELOG.md +++ b/UPDATELOG.md @@ -1,6 +1,10 @@ # LEEAlert - 更新日志 +V1.6.2 +============== +`leeShouldActionClickClose` 返回False时 Action的点击事件回调也会被调用 + V1.6.1 ============== 尝试解决iOS16 Window旋转问题