JonasGessner / JGProgressHUD

An elegant and simple progress HUD for iOS and tvOS, compatible with Swift and ObjC.
MIT License
3.35k stars 336 forks source link

Infinite progress HUD #130

Closed jonny999 closed 4 years ago

jonny999 commented 4 years ago

Observed on iOS 12.4.2 JGProgressHUD v2.1. If hideHUD() waits for async task to be finished and user leaves the viewController before (In my case I'm able to tap on "back" button on navigation bar), the JGProgressHUD isn't dismissed and blocks user from interaction with current screen. One solution is to call hideHUD()in viewWillDisappear() or viewDidDisappear(). But I believe this wasn't happening in previous versions of JGProgressHUD.

JonasGessner commented 4 years ago

If you're showing the HUD inside the view of the viewcontroller that gets dismissed then the HUD will also disappear. If it appears in another viewcontroller that is not dismissed (e.g. navigation controller) then the HUD stays visible as long as that view controller stays visisble. So you have to either show the HUD in the specific view controller that is dismissed or manually hide the HUD when the view controller disappears.

JonasGessner commented 4 years ago

@jonny999 bump.