SCLAlertView-Swift icon indicating copy to clipboard operation
SCLAlertView-Swift copied to clipboard

Error when show Alert

Open iThanh opened this issue 9 years ago • 3 comments

Hello developer and everybody,

When I try to show alert, I receive this error:

fatal error: unexpectedly found nil while unwrapping an Optional value

In line: let rv = UIApplication.shared.keyWindow! as UIWindow

Help me, please!

iThanh avatar Sep 16 '16 16:09 iThanh

same here

lucasbordini avatar Jan 04 '18 14:01 lucasbordini

same

soypaduano avatar Apr 26 '18 14:04 soypaduano

Hi guys, In my case, i am having that problem because i showed the alert in viewDidLoad method of the controller. I moved it to viewDidAppear and the alert started to work well.

DetectorApps avatar Jun 11 '19 14:06 DetectorApps