我有以下代码:
- (MKAnnotationView *) mapView:(MKMapView *) mapView viewForAnnotation:(id ) annotation {
MKPinAnnotationView *customAnnotationView=[[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:nil] autorelease];
customAnnotationView.pinColor = MKPinAnnotationColorRed;
customAnnotationView.animatesDrop = NO;
customAnnotationView.canShowCallout = YES;
UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[rightButton addTarget:self action:@selector(annotationViewClick:) forControlEvents:UIControlEventTouchUpInside];
customAnnotationView.rightCalloutAccessoryView = rightButton;
return customAnnotationView;
}
此方法更改地图视图上的每个注释,包括当前位置的蓝色圆圈注释。我只想更改我的自定义注释并单独保留当前位置注释。
我怎样才能做到这一点?