How to programmatically dismiss UIAlertController without any buttons?

Generally the parent view controller is responsible for dismissing the modally presented view controller (your popup). In Objective-C you would do something like this in the parent view controller:

[self dismissViewControllerAnimated:YES completion:nil];

The same code in Swift versions < 3 would be:

self.dismissViewControllerAnimated(true, completion: nil)

Swift 3.0:

self.dismiss(animated: true, completion: nil)

Leave a Comment

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