- (MKPinAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id) annotation{
MKPinAnnotationView *annView=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"MyPin"];
annView.enabled=YES;
[annView setCanShowCallout:NO];
annView.pinColor=MKPinAnnotationColorGreen;
UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
//[rightButton addTarget:self action:@selector(annotationViewClick:) forControlEvents:UIControlEventTouchUpInside];
annView.rightCalloutAccessoryView = rightButton;
return annView;
}
我只使用这个代码但是没有工作.....帮助我! 提前谢谢......
答案 0 :(得分:0)
通过设置[annView setCanShowCallout:NO];
,无法显示注释的标注。细节披露将在标注中显示。