There are two UIViewConrollers in my Storyboard: MainViewController and SecondViewController. I\'m going to show S
You need to set yourself as the popOverDelegate. You have to do this in the popoverPresentationController of the destination.
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
segue.destination.popoverPresentationController?.delegate = self
}
Then declare implement the delegates in your ViewController:
extension FormViewController: UIPopoverPresentationControllerDelegate {
func popoverPresentationControllerDidDismissPopover(_ popoverPresentationController: UIPopoverPresentationController) {
printBreadcrumb("Dismissed popover")
}
}