From b21b9eaa6e56e0698ee7aec80ec952f187d93a0a Mon Sep 17 00:00:00 2001 From: lixiang1994 <18611401994@163.com> Date: Thu, 2 Aug 2018 18:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=831.2.0=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=A0=8F=E6=A0=B7=E5=BC=8F=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Framework/LEEAlert/Info.plist | 2 +- LEEAlert.podspec | 4 ++-- LEEAlert/LEEAlert.h | 5 ++++- LEEAlert/LEEAlert.m | 25 ++++++++++++++++++++++++- LEEAlert/LEEAlertHelper.h | 4 +++- UPDATELOG.md | 5 +++++ 6 files changed, 39 insertions(+), 6 deletions(-) diff --git a/Framework/LEEAlert/Info.plist b/Framework/LEEAlert/Info.plist index 4d64213..d7fb954 100644 --- a/Framework/LEEAlert/Info.plist +++ b/Framework/LEEAlert/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.1.9 + 1.2.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/LEEAlert.podspec b/LEEAlert.podspec index 31d4a41..82aed5b 100644 --- a/LEEAlert.podspec +++ b/LEEAlert.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "LEEAlert" -s.version = "1.1.9" +s.version = "1.2.0" s.summary = "优雅的Alert ActionSheet" s.homepage = "https://github.com/lixiang1994/LEEAlert" @@ -13,7 +13,7 @@ s.author = { "LEE" => "18611401994@163.com" } s.platform = :ios s.platform = :ios, "8.0" -s.source = { :git => "https://github.com/lixiang1994/LEEAlert.git", :tag => "1.1.9"} +s.source = { :git => "https://github.com/lixiang1994/LEEAlert.git", :tag => "1.2.0"} s.source_files = "LEEAlert/**/*.{h,m}" diff --git a/LEEAlert/LEEAlert.h b/LEEAlert/LEEAlert.h index 1d4424b..b139457 100644 --- a/LEEAlert/LEEAlert.h +++ b/LEEAlert/LEEAlert.h @@ -13,7 +13,7 @@ * * @author LEE * @copyright Copyright © 2016 - 2018年 lee. All rights reserved. - * @version V1.1.9 + * @version V1.2.0 */ #import @@ -215,6 +215,9 @@ /** 设置 关闭动画样式 -> 格式: .LeeCloseAnimationStyle() */ @property (nonatomic , copy , readonly ) LEEConfigToAnimationStyle LeeCloseAnimationStyle; +/** 设置 状态栏样式 -> 格式: .LeeStatusBarStyle(UIStatusBarStyleDefault) */ +@property (nonatomic , copy , readonly ) LEEConfigToStatusBarStyle LeeStatusBarStyle; + /** 显示 -> 格式: .LeeShow() */ @property (nonatomic , copy , readonly ) LEEConfig LeeShow; diff --git a/LEEAlert/LEEAlert.m b/LEEAlert/LEEAlert.m index f78fc81..11412bf 100644 --- a/LEEAlert/LEEAlert.m +++ b/LEEAlert/LEEAlert.m @@ -13,7 +13,7 @@ * * @author LEE * @copyright Copyright © 2016 - 2018年 lee. All rights reserved. - * @version V1.1.9 + * @version V1.2.0 */ #import "LEEAlert.h" @@ -82,6 +82,7 @@ @interface LEEAlertConfigModel () @property (nonatomic , assign ) LEEAnimationStyle modelOpenAnimationStyle; @property (nonatomic , assign ) LEEAnimationStyle modelCloseAnimationStyle; +@property (nonatomic , assign ) UIStatusBarStyle modelStatusBarStyle; @property (nonatomic , assign ) UIBlurEffectStyle modelBackgroundBlurEffectStyle; @property (nonatomic , assign ) UIInterfaceOrientationMask modelSupportedInterfaceOrientations; @@ -798,6 +799,19 @@ - (LEEConfigToAnimationStyle)LeeCloseAnimationStyle{ } +- (LEEConfigToStatusBarStyle)LeeStatusBarStyle{ + + __weak typeof(self) weakSelf = self; + + return ^(UIStatusBarStyle style){ + + if (weakSelf) weakSelf.modelStatusBarStyle = style; + + return weakSelf; + }; + +} + - (LEEConfig)LeeShow{ @@ -1547,6 +1561,8 @@ - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id *)touches withEvent:(UIEvent *)event{ + [super touchesBegan:touches withEvent:event]; + if (self.config.modelIsClickBackgroundClose) [self closeAnimationsWithCompletionBlock:nil]; } @@ -1598,6 +1614,13 @@ - (UIInterfaceOrientationMask)supportedInterfaceOrientations{ return self.config.modelSupportedInterfaceOrientations; } +#pragma mark - 状态栏 + +- (UIStatusBarStyle)preferredStatusBarStyle { + + return self.config.modelStatusBarStyle; +} + @end #pragma mark - Alert diff --git a/LEEAlert/LEEAlertHelper.h b/LEEAlert/LEEAlertHelper.h index 465f690..d0450ce 100644 --- a/LEEAlert/LEEAlertHelper.h +++ b/LEEAlert/LEEAlertHelper.h @@ -13,7 +13,7 @@ * * @author LEE * @copyright Copyright © 2016 - 2018年 lee. All rights reserved. - * @version V1.1.9 + * @version V1.2.0 */ #ifndef LEEAlertHelper_h @@ -126,4 +126,6 @@ typedef LEEAlertConfigModel *(^LEEConfigToItem)(void(^)(LEEItem *item)); typedef LEEAlertConfigModel *(^LEEConfigToBlock)(void(^block)(void)); typedef LEEAlertConfigModel *(^LEEConfigToBlockAndBlock)(void(^)(void (^animatingBlock)(void) , void (^animatedBlock)(void))); +typedef LEEAlertConfigModel *(^LEEConfigToStatusBarStyle)(UIStatusBarStyle style); + #endif /* LEEAlertHelper_h */ diff --git a/UPDATELOG.md b/UPDATELOG.md index 696d85c..8f7fb6d 100644 --- a/UPDATELOG.md +++ b/UPDATELOG.md @@ -1,6 +1,11 @@ # LEEAlert - 更新日志 +V1.2.0 +============== +增加状态栏样式设置 +`.LeeStatusBarStyle(UIStatusBarStyleLightContent)` + V1.1.9 ============== 修复自定义视图自动适应宽度的计算异常问题