I'm working on a map which have some markers and I want to create an info view which will show an image and some text for each marker.

So, when I press the info button, it goes to a info view.

I have this on the code:
func mapView(mapView: MKMapView, annotationView: MKAnnotationView, calloutAccessoryControlTapped control: UIControl) {
    if control == annotationView.rightCalloutAccessoryView {
        performSegueWithIdentifier("showInfo", sender: data)
    }
}
But I want to pass the data from "locations" so I could show a image for each.
I need to do this in Swift.
Thanks a lot.
 
     
     
     
    