Skip to content

Commit

Permalink
1.5.1 修复[LEEAlert clearQueue]问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiang1994 committed Sep 3, 2021
1 parent 5eb93f0 commit 0caa261
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 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.5.0;
MARKETING_VERSION = 1.5.1;
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.5.0;
MARKETING_VERSION = 1.5.1;
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.5.0"
s.version = "1.5.1"
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 @@ -12,7 +12,7 @@
*
* @author LEE
* @copyright Copyright © 2016 - 2020年 lee. All rights reserved.
* @version V1.4.3
* @version V1.5.1
*/

#import <Foundation/Foundation.h>
Expand Down
17 changes: 16 additions & 1 deletion LEEAlert/LEEAlert.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -3691,6 +3696,8 @@ - (UIView *)actionSheetView{

@interface LEEBaseConfig ()<LEEAlertProtocol>

@property (nonatomic, assign) BOOL isShowing;

- (void)show;

@end
Expand All @@ -3708,6 +3715,8 @@ - (nonnull instancetype)init

if (self) {

self.isShowing = NO;

__weak typeof(self) weakSelf = self;

self.config.modelFinishConfig = ^{
Expand Down Expand Up @@ -3778,6 +3787,8 @@ - (void)show{
}

[[LEEAlert shareManager].leeWindow makeKeyAndVisible];

self.isShowing = YES;
}

if ([self.config.modelPresentation isKindOfClass:LEEPresentationViewController.class]) {
Expand All @@ -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;
Expand Down Expand Up @@ -3833,6 +3846,8 @@ - (void)show{

- (void)close{

if (!self.isShowing) return;

if ([self.config.modelPresentation isKindOfClass:LEEPresentationWindow.class]) {

[LEEAlert shareManager].leeWindow.hidden = YES;
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 - 2020年 lee. All rights reserved.
* @version V1.4.3
* @version V1.5.1
*/

#ifndef LEEAlertHelper_h
Expand Down
5 changes: 5 additions & 0 deletions UPDATELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@

# LEEAlert - 更新日志

V1.5.1
==============
修复`[LEEAlert clearQueue]`问题


V1.5.0
==============
移除`.LeeWindowLevel(UIWindowLevel)`设置
Expand Down

0 comments on commit 0caa261

Please sign in to comment.