我试图隐藏AnnotationView而不触及别针,可能吗? 谢谢!
for (id currentAnnotation in self.mapView.annotations) {
if ([currentAnnotation isKindOfClass:[MyAnnotation class]]) {
}
}
答案 0 :(得分:30)
你是否只想让标注泡泡消失但保留销钉? 如果是,那么这样做:
for (id currentAnnotation in self.mapView.annotations) {
if ([currentAnnotation isKindOfClass:[MyAnnotation class]]) {
[self.mapView deselectAnnotation:currentAnnotation animated:YES];
}
}