Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running error Unexpectedly found nil while unwrapping an Optional value #237

Open
tuotuoZ opened this issue Sep 19, 2018 · 1 comment
Open

Comments

@tuotuoZ
Copy link

tuotuoZ commented Sep 19, 2018

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!

@Kamil-H
Copy link

Kamil-H commented Oct 22, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants