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 回答