【发布时间】:2012-10-21 16:52:00
【问题描述】:
我有以下代码:
- (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;
}
这个方法改变了mapview上的每一个注解,包括当前位置的蓝圈注解。我只想更改我的自定义注释,不理会当前位置注释。
我该怎么做?
【问题讨论】:
标签: ios mapkit mkannotation mkannotationview