- (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;
}
I m using this code only but ts not woking.....Help m开发者_StackOverflow中文版e!!! Thanks in advance......
By setting [annView setCanShowCallout:NO];
the call-out for the annotation cannot be displayed. And the detail disclosure will be visible in the callout.
精彩评论