14

ピンに触れずに AnnotationView を非表示にしようとしていますが、可能ですか? ありがとう!

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

1 に答える 1

30

吹き出しの吹き出しを消したいだけで、ピンはそのままにしておきますか?
はいの場合は、次のようにします。

for (id currentAnnotation in self.mapView.annotations) {        
    if ([currentAnnotation isKindOfClass:[MyAnnotation class]]) { 
        [self.mapView deselectAnnotation:currentAnnotation animated:YES];
    } 
}
于 2010-05-27T03:07:32.287 に答える