From a parent controller I call another child ( popoverContent )
with self.present
, the child driver is a typical view in the form of a popup that I end up closing with a dismiss but I want to pass some data to the parent view.
Call within the parent driver code:
self.present(popoverContent, animated: true, completion: nil )
I close the daughter view ( popoverContent
) with an action of a button
@IBAction func exitButtonAction(_ sender: Any) {
self.dismiss(animated: true, completion: nil)
}
How can I pass a parameter of type String, or Int, or dictionary to the parent view after closing the daughter view with dismiss?