Open tuotuoZ opened 6 years ago
@tuotuoZ
I don't know your exact case, but in mine using a onView
parameter function where you can provide UIView
on which you want to show dialog helped me. In your case it would be:
HUD.flash(.success, onView: **view**, delay: 1.0, completion: nil)
where view
is a root view of my ViewController.
I am testing out the HUD.flash(.success, delay: 1.0) in a new class. And I got this running error: Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value
from line 122 let view: UIView = view ?? viewToPresentOn ?? UIApplication.shared.keyWindow!