From 1efc2daeededabbe4c0d721f41beadfd76d33938 Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 16 Aug 2016 18:56:50 +0800 Subject: [PATCH] V 2.3.3. --- LCActionSheet.podspec | 2 +- LCActionSheet/LCActionSheet.h | 21 +++++++++++-------- LCActionSheet/LCActionSheet.m | 16 ++++++++++++++ .../xcdebugger/Breakpoints_v2.xcbkptlist | 5 +++++ LCActionSheetDemo/Info.plist | 2 +- README.md | 7 +++++++ 6 files changed, 42 insertions(+), 11 deletions(-) create mode 100644 LCActionSheetDemo.xcworkspace/xcuserdata/Leo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist diff --git a/LCActionSheet.podspec b/LCActionSheet.podspec index 1cecb46..ac605af 100644 --- a/LCActionSheet.podspec +++ b/LCActionSheet.podspec @@ -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" diff --git a/LCActionSheet/LCActionSheet.h b/LCActionSheet/LCActionSheet.h index d336bfd..d6ccba9 100644 --- a/LCActionSheet/LCActionSheet.h +++ b/LCActionSheet/LCActionSheet.h @@ -8,7 +8,7 @@ // GitHub: http://github.com/iTofu // Mail: mailto:devtip@163.com // -// V 2.3.2 +// V 2.3.3 #import @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -272,6 +272,9 @@ typedef void(^LCActionSheetDidDismissBlock)(LCActionSheet *actionSheet, NSIntege clicked:(LCActionSheetClickedBlock)clickedBlock otherButtonTitleArray:(NSArray *)otherButtonTitleArray; + +#pragma mark Append & Show + /** * Append buttons with titles. * diff --git a/LCActionSheet/LCActionSheet.m b/LCActionSheet/LCActionSheet.m index 9942c15..126b0ac 100644 --- a/LCActionSheet/LCActionSheet.m +++ b/LCActionSheet/LCActionSheet.m @@ -41,6 +41,8 @@ @interface LCActionSheet () @property (nonatomic, weak) UITableView *tableView; @property (nonatomic, weak) UIButton *cancelButton; +@property (nonatomic, weak) UIView *whiteBgView; + @end @implementation LCActionSheet @@ -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]; @@ -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]; @@ -342,6 +356,8 @@ - (void)blurBottomBgView { } - (void)unBlurBottomBgView { + self.whiteBgView.hidden = NO; + if (self.blurEffectView) { [self.blurEffectView removeFromSuperview]; self.blurEffectView = nil; diff --git a/LCActionSheetDemo.xcworkspace/xcuserdata/Leo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/LCActionSheetDemo.xcworkspace/xcuserdata/Leo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..ed9a9b4 --- /dev/null +++ b/LCActionSheetDemo.xcworkspace/xcuserdata/Leo.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/LCActionSheetDemo/Info.plist b/LCActionSheetDemo/Info.plist index ace9b69..b5b1aae 100644 --- a/LCActionSheetDemo/Info.plist +++ b/LCActionSheetDemo/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.3.2 + 2.3。3 CFBundleSignature ???? CFBundleVersion diff --git a/README.md b/README.md index 4ced07d..b73560e 100644 --- a/README.md +++ b/README.md @@ -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: