Skip to content

Commit

Permalink
fix: #39
Browse files Browse the repository at this point in the history
  • Loading branch information
yulingtianxia committed Sep 14, 2022
1 parent de0ddaa commit 2cdef40
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 23 deletions.
1 change: 1 addition & 0 deletions Example/TBAlertControllerDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -38,8 +36,8 @@
ReferencedContainer = "container:TBAlertControllerDemo.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -61,8 +59,6 @@
ReferencedContainer = "container:TBAlertControllerDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
20 changes: 4 additions & 16 deletions Source/TBActionSheet/TBActionSheet.m
Original file line number Diff line number Diff line change
Expand Up @@ -491,13 +491,12 @@ - (void)setupStyle

CGFloat containerHeight = self.actionContainer.bounds.size.height;

self.originalBackgroundImage = [self screenShotRect:CGRectMake(kContainerLeft, kScreenHeight - containerHeight, self.sheetWidth, containerHeight)];

__block BOOL useBoxBlurEffect = NO;

if (!self.isBackgroundTransparentEnabled) {
if (self.isBlurEffectEnabled) {
if (![self.actionContainer useSystemBlurEffect]) {
self.originalBackgroundImage = [self screenShotRect:CGRectMake(kContainerLeft, kScreenHeight - containerHeight, self.sheetWidth, containerHeight)];
TBWeakSelf(self);
TBBlurEffectBlock blurBlock = ^void() {
TBStrongSelf(self);
Expand Down Expand Up @@ -684,18 +683,6 @@ - (void)setupStyle
}];
}

- (void)refreshBlurEffect
{
CGFloat containerHeight = self.actionContainer.bounds.size.height;

self.originalBackgroundImage = [self screenShotRect:CGRectMake(kContainerLeft, kScreenHeight-containerHeight, self.sheetWidth, containerHeight)];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
for (void (^blurBlock)(void) in self.blurBlocks) {
blurBlock();
}
});
}

- (void)updateContainerFrame
{
CGFloat y = kScreenHeight - self.actionContainer.frame.size.height;
Expand Down Expand Up @@ -893,10 +880,11 @@ - (BOOL)hasHeader
return [self hasTitle] || [self hasMessage];
}

- (void)addSeparatorLineAt:(CGPoint) point isBigFragment:(BOOL) isBigFragment
- (void)addSeparatorLineAt:(CGPoint)point isBigFragment:(BOOL)isBigFragment
{
UIView *separatorLine = [[UIView alloc] initWithFrame:CGRectMake(point.x, point.y, self.sheetWidth, isBigFragment ? self.bigFragment : self.smallFragment)];
separatorLine.backgroundColor = self.separatorColor;
separatorLine.backgroundColor = isBigFragment ? [UIColor clearColor] : self.separatorColor;

[self.actionContainer addSubview:separatorLine];
[self.separators addObject:separatorLine];
}
Expand Down
2 changes: 1 addition & 1 deletion TBActionSheet.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "TBActionSheet"
s.version = "1.7.4"
s.version = "1.7.5"
s.summary = "A Custom&Magical ActionSheet."
s.description = <<-DESC
TBActionSheet is a small library that allows you to substitute Apple's uncustomizable UIActionSheet, with a beautiful and totally customizable actionsheet that you can use in your iOS app. The default style is iOS9/10, you can make your own style. Enjoy!
Expand Down

0 comments on commit 2cdef40

Please sign in to comment.