diff --git a/Source/TBActionSheet/TBActionContainer.m b/Source/TBActionSheet/TBActionContainer.m index 9b9ef59..b53e307 100644 --- a/Source/TBActionSheet/TBActionContainer.m +++ b/Source/TBActionSheet/TBActionContainer.m @@ -48,7 +48,7 @@ - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event - (BOOL)useSystemBlurEffect { - if (kiOS10Later) { + if (kiOS10Later && self.actionSheet.rectCornerRadius > 0) { return NO; } if (kiOS8Later) { @@ -66,7 +66,7 @@ - (BOOL)useSystemBlurEffect - (BOOL)useSystemBlurEffectUnderView:(UIView *)view { - if (!view || kiOS10Later) { + if (!view || (kiOS10Later && self.actionSheet.rectCornerRadius > 0)) { return NO; } if (kiOS8Later) { diff --git a/Source/TBActionSheet/TBActionSheet.m b/Source/TBActionSheet/TBActionSheet.m index dd21a6c..665e2c9 100644 --- a/Source/TBActionSheet/TBActionSheet.m +++ b/Source/TBActionSheet/TBActionSheet.m @@ -511,6 +511,9 @@ - (void)setupStyle UIImage *backgroundImage = [cutOriginalBackgroundImageInRect(self.actionContainer.header.frame) drn_boxblurImageWithBlur:blurRadius withTintColor:self.ambientColor]; self.actionContainer.header.image = backgroundImage; } + else { + self.actionContainer.header.image = nil; + } } else { self.actionContainer.header.image = nil; @@ -528,6 +531,9 @@ - (void)setupStyle UIImage *backgroundImage = [cutOriginalBackgroundImageInRect(self.actionContainer.custom.frame) drn_boxblurImageWithBlur:blurRadius withTintColor:self.ambientColor]; self.actionContainer.custom.image = backgroundImage; } + else { + self.actionContainer.custom.image = nil; + } } else { self.actionContainer.custom.image = nil; @@ -550,6 +556,10 @@ - (void)setupStyle [obj setBackgroundImage:backgroundImageHighlighted forState:UIControlStateHighlighted]; obj.backgroundColor = [UIColor clearColor]; } + else { + [obj setBackgroundImage:nil forState:UIControlStateNormal]; + [obj setBackgroundImage:nil forState:UIControlStateHighlighted]; + } } else { [obj setBackgroundImage:nil forState:UIControlStateNormal]; diff --git a/Source/TBActionSheet/UIView+TBAdditions.m b/Source/TBActionSheet/UIView+TBAdditions.m index 886ee5e..2da34b5 100644 --- a/Source/TBActionSheet/UIView+TBAdditions.m +++ b/Source/TBActionSheet/UIView+TBAdditions.m @@ -93,6 +93,10 @@ - (void)setNoneCorner - (void)setCornerRadius:(CGFloat) radius { + if (radius == 0) { + [self setNoneCorner]; + return; + } switch (self.tbRectCorner) { case TBRectCornerTop: { [self setTopCornerRadius:radius]; @@ -116,4 +120,4 @@ - (void)setCornerRadius:(CGFloat) radius } } -@end \ No newline at end of file +@end