0
I have a viewcontroller that opens a Popover. This first opens a second Popover. But when I give a self.Ismiss on any of the popovers is closing all the popovers and the viewcontroller that called it.
I use the following commands to call each Pover:
performSegue(withIdentifier: "callDriverPopupSegue", sender: self)
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "callDriverPopSegue" {
let popOver = segue.destination as! CallDriverPopup
popOver.modalPresentationStyle = .popover
popOver.popoverPresentationController!.delegate = self
}
}
To close use:
dismiss(animated: true, completion: nil)