Open stephen-talari opened 8 years ago
Same here
@stephen-talari I solved, if you call SweetAlert in ViewDidLoad it crash, i tried in viewdidappear and a button action it worked fine. Happy coding
There is no keyWindow at that point. I would add replace the following
let window: UIWindow = UIApplication.sharedApplication().keyWindow!
with:
guard let window: UIWindow = UIApplication.sharedApplication().keyWindow! else { return }
Always crashes at line 243
let window: UIWindow = UIApplication.sharedApplication().keyWindow!
with errorfatal error: unexpectedly found nil while unwrapping an Optional value
i am calling following code in my viewController in viewDidLoad() method
SweetAlert().showAlert("Good job!", subTitle: "You clicked the button!", style: AlertStyle.Success)
`