2010-05-27 58 views
14

我想隱藏一個AnnotationView而不用觸摸這個引腳,是可能的嗎? 謝謝!如何隱藏MKAnnotationView標註?

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

回答

30

你只是想標註泡沫消失,但保持腳?
如果是,則執行此操作:

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