Skip to content

Commit

Permalink
V 2.3.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo committed Aug 16, 2016
1 parent e04dafb commit 1efc2da
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 11 deletions.
2 changes: 1 addition & 1 deletion LCActionSheet.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "LCActionSheet"
s.version = "2.3.2"
s.version = "2.3.3"
s.summary = "A simple, ornamental, but powerful action sheet! Support: http://LeoDev.me"
s.homepage = "https://github.com/iTofu/LCActionSheet"
s.license = "MIT"
Expand Down
21 changes: 12 additions & 9 deletions LCActionSheet/LCActionSheet.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// GitHub: http://github.com/iTofu
// Mail: mailto:devtip@163.com
//
// V 2.3.2
// V 2.3.3

#import <UIKit/UIKit.h>

Expand Down Expand Up @@ -150,7 +150,7 @@ typedef void(^LCActionSheetDidDismissBlock)(LCActionSheet *actionSheet, NSIntege
#pragma mark Delegate

/**
* Initialize an instance of LCActionSheet.
* Initialize an instance of LCActionSheet (Delegate).
*
* @param title title
* @param delegate delegate
Expand All @@ -165,7 +165,7 @@ typedef void(^LCActionSheetDidDismissBlock)(LCActionSheet *actionSheet, NSIntege
otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;

/**
* Initialize an instance of LCActionSheet with title array.
* Initialize an instance of LCActionSheet with title array (Delegate).
*
* @param title title
* @param delegate delegate
Expand All @@ -180,7 +180,7 @@ typedef void(^LCActionSheetDidDismissBlock)(LCActionSheet *actionSheet, NSIntege
otherButtonTitleArray:(NSArray *)otherButtonTitleArray;

/**
* Initialize an instance of LCActionSheet.
* Initialize an instance of LCActionSheet (Delegate).
*
* @param title title
* @param delegate delegate
Expand All @@ -195,7 +195,7 @@ typedef void(^LCActionSheetDidDismissBlock)(LCActionSheet *actionSheet, NSIntege
otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;

/**
* Initialize an instance of LCActionSheet with title array.
* Initialize an instance of LCActionSheet with title array (Delegate).
*
* @param title title
* @param delegate delegate
Expand All @@ -213,7 +213,7 @@ typedef void(^LCActionSheetDidDismissBlock)(LCActionSheet *actionSheet, NSIntege
#pragma mark Block

/**
* Initialize an instance of LCActionSheet.
* Initialize an instance of LCActionSheet (Block).
*
* @param title title
* @param cancelButtonTitle cancelButtonTitle
Expand All @@ -228,7 +228,7 @@ typedef void(^LCActionSheetDidDismissBlock)(LCActionSheet *actionSheet, NSIntege
otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;

/**
* Initialize an instance of LCActionSheet with title array.
* Initialize an instance of LCActionSheet with title array (Block).
*
* @param title title
* @param delegate delegate
Expand All @@ -243,7 +243,7 @@ typedef void(^LCActionSheetDidDismissBlock)(LCActionSheet *actionSheet, NSIntege
otherButtonTitleArray:(NSArray *)otherButtonTitleArray;

/**
* Initialize an instance of LCActionSheet.
* Initialize an instance of LCActionSheet (Block).
*
* @param title title
* @param cancelButtonTitle cancelButtonTitle
Expand All @@ -258,7 +258,7 @@ typedef void(^LCActionSheetDidDismissBlock)(LCActionSheet *actionSheet, NSIntege
otherButtonTitles:(NSString *)otherButtonTitles, ... NS_REQUIRES_NIL_TERMINATION;

/**
* Initialize an instance of LCActionSheet with title array.
* Initialize an instance of LCActionSheet with title array (Block).
*
* @param title title
* @param delegate delegate
Expand All @@ -272,6 +272,9 @@ typedef void(^LCActionSheetDidDismissBlock)(LCActionSheet *actionSheet, NSIntege
clicked:(LCActionSheetClickedBlock)clickedBlock
otherButtonTitleArray:(NSArray *)otherButtonTitleArray;


#pragma mark Append & Show

/**
* Append buttons with titles.
*
Expand Down
16 changes: 16 additions & 0 deletions LCActionSheet/LCActionSheet.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ @interface LCActionSheet () <UITableViewDataSource, UITableViewDelegate>
@property (nonatomic, weak) UITableView *tableView;
@property (nonatomic, weak) UIButton *cancelButton;

@property (nonatomic, weak) UIView *whiteBgView;

@end

@implementation LCActionSheet
Expand Down Expand Up @@ -211,8 +213,18 @@ - (void)setupView {
action:@selector(darkViewClicked)];
[darkView addGestureRecognizer:tap];

UIView *whiteBgView = [[UIView alloc] init];
whiteBgView.backgroundColor = [UIColor whiteColor];
[bottomView addSubview:whiteBgView];
[whiteBgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(bottomView);
}];
self.whiteBgView = whiteBgView;

if (!self.unBlur) {
[self blurBottomBgView];
} else {
whiteBgView.hidden = NO;
}

UILabel *titleLabel = [[UILabel alloc] init];
Expand Down Expand Up @@ -328,6 +340,8 @@ - (void)handleDidChangeStatusBarOrientation {
}

- (void)blurBottomBgView {
self.whiteBgView.hidden = YES;

if (!self.blurEffectView) {
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:self.blurEffectStyle];
UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
Expand All @@ -342,6 +356,8 @@ - (void)blurBottomBgView {
}

- (void)unBlurBottomBgView {
self.whiteBgView.hidden = NO;

if (self.blurEffectView) {
[self.blurEffectView removeFromSuperview];
self.blurEffectView = nil;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "0"
version = "2.0">
</Bucket>
2 changes: 1 addition & 1 deletion LCActionSheetDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.3.2</string>
<string>2.3。3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ In me the tiger sniffs the rose.

## 版本 Release

### V 2.3.3 (2016.08.16)

* 修复设置 `actionSheet.unBlur = YES;` 后背景透明的 Bug。

* 完善注释,移除无用类。


### V 2.3.2 (2016.08.16)

* 可以自定义 blurEffectStyle:
Expand Down

0 comments on commit 1efc2da

Please sign in to comment.