I have this function:
func mapView(mapView: MKMapView!, annotationView view: MKAnnotationView!, calloutAccessoryControlTapped control: UIControl!) {
performSegueWithIdentifier("mapToCity", sender: self)
var title = view.annotation.title
var subtitle = view.annotation.subtitle
var lat = view.annotation.coordinate.latitude
var lng = view.annotation.coordinate.longitude
var image = view.annotation.image
}
And I declared the annotation this way:
var marker = CustomPointAnnotation()
marker.coordinate = CLLocationCoordinate2D(latitude: lat.doubleValue, longitude: lng.doubleValue)
marker.title = title.string
marker.subtitle = subtitle.string
marker.imageName = "marker.png"
marker.image = "Test";
mapView.addAnnotation(marker)
But the problem is that I can't call the variable view.annotation.image
because the member image does not exist. So how do I add the member image so I can use that too?