Skip to content

Commit

Permalink
发布1.2.0 增加状态栏样式设置
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiang1994 committed Aug 2, 2018
1 parent 072fbf5 commit b21b9ea
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Framework/LEEAlert/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.9</string>
<string>1.2.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
4 changes: 2 additions & 2 deletions 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.1.9"
s.version = "1.2.0"
s.summary = "优雅的Alert ActionSheet"

s.homepage = "https://github.com/lixiang1994/LEEAlert"
Expand All @@ -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}"

Expand Down
5 changes: 4 additions & 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 - 2018年 lee. All rights reserved.
* @version V1.1.9
* @version V1.2.0
*/

#import <Foundation/Foundation.h>
Expand Down Expand Up @@ -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;
Expand Down
25 changes: 24 additions & 1 deletion LEEAlert/LEEAlert.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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{

Expand Down Expand Up @@ -1547,6 +1561,8 @@ - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIVi

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{

[super touchesBegan:touches withEvent:event];

if (self.config.modelIsClickBackgroundClose) [self closeAnimationsWithCompletionBlock:nil];
}

Expand Down Expand Up @@ -1598,6 +1614,13 @@ - (UIInterfaceOrientationMask)supportedInterfaceOrientations{
return self.config.modelSupportedInterfaceOrientations;
}

#pragma mark - 状态栏

- (UIStatusBarStyle)preferredStatusBarStyle {

return self.config.modelStatusBarStyle;
}

@end

#pragma mark - Alert
Expand Down
4 changes: 3 additions & 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 - 2018年 lee. All rights reserved.
* @version V1.1.9
* @version V1.2.0
*/

#ifndef LEEAlertHelper_h
Expand Down Expand Up @@ -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 */
5 changes: 5 additions & 0 deletions UPDATELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@

# LEEAlert - 更新日志

V1.2.0
==============
增加状态栏样式设置
`.LeeStatusBarStyle(UIStatusBarStyleLightContent)`

V1.1.9
==============
修复自定义视图自动适应宽度的计算异常问题
Expand Down

0 comments on commit b21b9ea

Please sign in to comment.