2010-05-27 18 views
14

ich versuche, eine AnnotationView zu verstecken, ohne den Pin zu berühren, ist das möglich? Danke!Wie MKAnnotationView Callout ausblenden?

for (id currentAnnotation in self.mapView.annotations) {   
if ([currentAnnotation isKindOfClass:[MyAnnotation class]]) { 
    } 
} 

Antwort

30

Wollen Sie nur die Callout-Blase verschwinden lassen, aber den Pin behalten?
Wenn ja, dann folgendes tun:

for (id currentAnnotation in self.mapView.annotations) {   
    if ([currentAnnotation isKindOfClass:[MyAnnotation class]]) { 
     [self.mapView deselectAnnotation:currentAnnotation animated:YES]; 
    } 
}