I have 3 ViewControllers A B C. A and B ViewControllers use C to get data. Both A and B have a select button so if user is on A ViewController and presses select a segue is performed to C the user selects data that is stored in a dictionary pressed done and segue is performed to come back to A and dictionary is sent back using prepare for segue. Exactly the same if user is on B ViewController.
Problems How do I let C know which ViewController to send the dictionary back to. Is their a way I can use dismiss to send the dictionary back to the ViewController the user came from or maybe a better way.
Code from C ViewContrller
@IBAction func doneBtnPressed(_ sender: Any) {
    performSegue(withIdentifier: "backToAddMeetingVC", sender: self)
    //Cant work cuz cant perform 2 segues at once
    performSegue(withIdentifier: "backToProjectVC", sender: <#T##Any?#>)
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    if segue.identifier == "backToAddMeetingVC" {
        let destination = segue.destination as! AddMeetingVC
        destination.selectedMembers = self.selectedMembers
    }
    if segue.identifier == "backToProjectVC" {
        let destination = segue.destination as! ProjectsVC
        destination.selectedMembers = self.selectedMembers
    }
}
 
     
     
     
    