I have many annotations in a mapview (with rightCalloutAccessory buttons). The button will perform a segue from this mapview to a tableview>
rightCalloutAccessory
mapview
tableview>
In Swift 4.2 I would do something like that:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if let yourVC = segue.destination as? YourViewController { yourVC.yourData = self.someData } }