Skip to content

Commit

Permalink
增加是否可滑动开关 .LeeIsScrollEnabled(YES)
Browse files Browse the repository at this point in the history
lixiang1994 committed Aug 21, 2019
1 parent 49efce5 commit 6baf8d7
Showing 5 changed files with 27 additions and 4 deletions.
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.2.7"
s.version = "1.2.8"
s.summary = "优雅的Alert ActionSheet"

s.homepage = "https://github.com/lixiang1994/LEEAlert"
5 changes: 4 additions & 1 deletion LEEAlert/LEEAlert.h
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
*
* @author LEE
* @copyright Copyright © 2016 - 2019年 lee. All rights reserved.
* @version V1.2.7
* @version V1.2.8
*/

#import <Foundation/Foundation.h>
@@ -190,6 +190,9 @@ NS_ASSUME_NONNULL_BEGIN
/** 设置 点击背景关闭 -> 格式: .LeeClickBackgroundClose(YES) */
@property (nonatomic , copy , readonly ) LEEConfigToBool LeeClickBackgroundClose;

/** 设置 是否可滑动 -> 格式: .LeeIsScrollEnabled(YES) */
@property (nonatomic , copy , readonly ) LEEConfigToBool LeeIsScrollEnabled;

/** 设置 阴影偏移 -> 格式: .LeeShadowOffset(CGSizeMake(0.0f, 2.0f)) */
@property (nonatomic , copy , readonly ) LEEConfigToSize LeeShadowOffset;

18 changes: 17 additions & 1 deletion LEEAlert/LEEAlert.m
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
*
* @author LEE
* @copyright Copyright © 2016 - 2019年 lee. All rights reserved.
* @version V1.2.7
* @version V1.2.8
*/

#import "LEEAlert.h"
@@ -64,6 +64,7 @@ @interface LEEAlertConfigModel ()
@property (nonatomic , assign ) BOOL modelIsQueue;
@property (nonatomic , assign ) BOOL modelIsContinueQueueDisplay;
@property (nonatomic , assign ) BOOL modelIsAvoidKeyboard;
@property (nonatomic , assign ) BOOL modelIsScrollEnabled;

@property (nonatomic , assign ) CGSize modelShadowOffset;
@property (nonatomic , assign ) CGPoint modelAlertCenterOffset;
@@ -140,6 +141,7 @@ - (instancetype)init
_modelIsQueue = NO; //默认不加入队列
_modelIsContinueQueueDisplay = YES; //默认继续队列显示
_modelIsAvoidKeyboard = YES; //默认闪避键盘
_modelIsScrollEnabled = YES; //默认可以滑动

_modelBackgroundStyle = LEEBackgroundStyleTranslucent; //默认为半透明背景样式

@@ -562,6 +564,17 @@ - (LEEConfigToBool)LeeClickBackgroundClose{

}

- (LEEConfigToBool)LeeIsScrollEnabled{

return ^(BOOL is){

self.modelIsScrollEnabled = is;

return self;
};

}

- (LEEConfigToSize)LeeShadowOffset{

return ^(CGSize size){
@@ -2156,6 +2169,8 @@ - (void)configAlert{

self.containerView.layer.shadowColor = self.config.modelShadowColor.CGColor;

self.alertView.scrollEnabled = self.config.modelIsScrollEnabled;

if (!CornerRadiiEqualTo(self.config.modelCornerRadii, CornerRadiiNull())) {

self.alertView.lee_alert_cornerRadii = self.config.modelCornerRadii;
@@ -2875,6 +2890,7 @@ - (void)configActionSheet{

self.containerView.layer.shadowColor = self.config.modelShadowColor.CGColor;

self.actionSheetView.scrollEnabled = self.config.modelIsScrollEnabled;

if (!CornerRadiiEqualTo(self.config.modelCornerRadii, CornerRadiiNull())) {

2 changes: 1 addition & 1 deletion LEEAlert/LEEAlertHelper.h
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
*
* @author LEE
* @copyright Copyright © 2016 - 2019年 lee. All rights reserved.
* @version V1.2.7
* @version V1.2.8
*/

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

# LEEAlert - 更新日志

V1.2.8
==============
增加是否可滑动开关 `.LeeIsScrollEnabled(YES)`

V1.2.7
==============
增加`.LeeCornerRadii(CornerRadiiMake(13.0f, 13.0f, 13.0f, 13.0f))` 圆角半径设置方法 支持4个圆角不同半径的设置

0 comments on commit 6baf8d7

Please sign in to comment.