Skip to content

Commit 12fc746

Browse files
authored
Update IHProgressHUD.swift
fix dispatch time in dismiss with delay.
1 parent 84b6536 commit 12fc746

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/IHProgressHUD/IHProgressHUD.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ public class IHProgressHUD : UIView {
626626
// values to check if an animation is necessary. The evaluation happens at function call time and not
627627
// after the delay => the animation is sometimes skipped. Therefore we delay using dispatch_after.
628628

629-
let dipatchTime = DispatchTime.now() + Double(Int64(delay * Double(NSEC_PER_SEC)))
629+
let dipatchTime = DispatchTime.now() + delay
630630
DispatchQueue.main.asyncAfter(deadline: dipatchTime, execute: {
631631
if strongSelf.fadeOutAnimationDuration > 0 {
632632
UIView.animate(withDuration: strongSelf.fadeOutAnimationDuration, delay: 0, options: [.allowUserInteraction, .curveEaseOut, .beginFromCurrentState], animations: {

0 commit comments

Comments
 (0)