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