From 3c71d0ca2140cea91c09fa34d95f52de6cd9d133 Mon Sep 17 00:00:00 2001 From: rensaini Date: Thu, 23 Dec 2021 11:04:56 +0800 Subject: [PATCH] fix #605 change: fix #605 add: modified grace time to 0 and show again --- .../xcshareddata/IDEWorkspaceChecks.plist | 8 ++++++++ MBProgressHUD.m | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 Demo/HudDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Demo/HudDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Demo/HudDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000..18d981003 --- /dev/null +++ b/Demo/HudDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/MBProgressHUD.m b/MBProgressHUD.m index a2829a390..f3fdd5833 100644 --- a/MBProgressHUD.m +++ b/MBProgressHUD.m @@ -140,6 +140,10 @@ - (void)showAnimated:(BOOL)animated { } // ... otherwise show the HUD immediately else { + // Modified grace time to 0 and show again + [self.graceTimer invalidate]; + // fix #605: https://github.com/jdg/MBProgressHUD/issues/605 + [self.hideDelayTimer invalidate]; [self showUsingAnimation:self.useAnimation]; } } @@ -203,9 +207,6 @@ - (void)showUsingAnimation:(BOOL)animated { [self.bezelView.layer removeAllAnimations]; [self.backgroundView.layer removeAllAnimations]; - // Cancel any scheduled hideAnimated:afterDelay: calls - [self.hideDelayTimer invalidate]; - self.showStarted = [NSDate date]; self.alpha = 1.f;