Dismissing UIAlertController call's dismiss on presenting view controller

When presening UIAlertController on top of modally presented view controller on dismissing alert controller it calls dismiss method on presenting view controller but not dismissing it.


Issue 1: It should not call dismiss on presenting view controller

Issue 2: If it's calling why it's not actually dismissing the view controller?


let alert = UIAlertController(title: "", message: "", preferredStyle: .alert)
let action = UIAlertAction(title: "Ok", style: .default, handler: nil)
alert.addAction(action)
self.present(alert, animated: true, completion: nil)



View hierarchy :

1 Navigation controller -> rootViewcontroller -> view controller -> alert controller

You showed us the code that is working ("...self.present..."). Show us the code ("....on dismissing alert controller") that is not working!

Did you found out what was happening ?

I'm having the same issue.

Dismissing UIAlertController call's dismiss on presenting view controller
 
 
Q