-(MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation {
MKPinAnnotationView *MyPin=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"User"];
UIImageView *myCustomImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@""]];
MyPin.leftCalloutAccessoryView = myCustomImage;
}
我想将注释的 leftCalloutAccessoryView 设置为直到运行时才知道的特定图像。我在创建的每个单独注释中定义了所需的特定图像,但是如何在此函数中访问特定注释的类,以便我可以相应地设置 myCustomImage?