(MKAnnotationView *) mapView:(MKMapView *)theMapView
viewForAnnotation:(id <MKAnnotation>)annotation
{
if ([annotation isKindOfClass: [MyLocation class] ])
{
MKPinAnnotationView *annotationView = (MKPinAnnotationView *) [theMapView dequeueReusableAnnotationViewWithIdentifier:placemarkIdentifier];
if(annotationView == nil)
{
annotationView = [[MKPinAnnotationView alloc]initWithAnnotation:annotation reuseIdentifier:placemarkIdentifier];
}
else
{
annotationView.annotation = annotation;
}
annotationView.enabled = YES;
annotationView.animatesDrop = NO;
annotationView.pinColor = MKPinAnnotationColorPurple;
annotationView.canShowCallout = YES;
annotationView.draggable = YES;
return annotationView;
}
}
[MKAnnotationView setAnimatesDrop:]:
unrecognized selector sent to instance.
I use a number of annotations classes (MKPinAnnotationView and MKAnnotationView). May be this error occurred because I use the dequeueReusableAnnotationViewWithIdentifier.