Simple App Delegate method to show an UIAlertController (in Swift)

Try using

self.window?.rootViewController?.presentViewController(importAlert, animated: true, completion: nil)

All you need is a viewController object to present the AlertController from.

In Swift 4:

self.window?.rootViewController?.present(importAlert, animated: true, completion: nil)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)