如何隐藏MKAnnotationView标注?

时间:2010-05-27 02:40:52

标签: iphone sdk mkannotation mkannotationview callouts

我试图隐藏AnnotationView而不触及别针,可能吗? 谢谢!

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

1 个答案:

答案 0 :(得分:30)

你是否只想让标注泡泡消失但保留销钉? 如果是,那么这样做:

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