relatedcode / ProgressHUD

ProgressHUD is a lightweight and easy-to-use HUD for iOS. Over 5000+ animations. ‼️
https://relatedcode.com
MIT License
2.83k stars 464 forks source link

if dismiss and then show again immediately , it will not show. #143

Closed TushningJJ closed 1 year ago

TushningJJ commented 1 year ago
    ProgressHUD.show()

    DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 2) {

        ProgressHUD.dismiss()

        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.04) {
            ProgressHUD.showError()
        }
      // DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.05) {
        //    ProgressHUD.showError()
        // }
    }

if i want show again ,i should set greater than 0.05 TimeInterval ,otherwise is will not show .

relatedcode commented 1 year ago

Please use the ProgressHUD.remove() instead of the ProgressHUD.dismiss() if you plan to re-display the ProgressHUD immediately. Thanks!