开发者

How to Hide MKAnnotationView Callout?

开发者 https://www.devze.com 2023-01-01 00:15 出处:网络
i\'m trying to hide an AnnotationView without touching the pin, is the possible? Thanks! for (id currentAnnotation in self.mapView.annotatio开发者_开发技巧ns) {

i'm trying to hide an AnnotationView without touching the pin, is the possible? Thanks!

for (id currentAnnotation in self.mapView.annotatio开发者_开发技巧ns) {        
if ([currentAnnotation isKindOfClass:[MyAnnotation class]]) { 
    } 
}


Do you just want to make the callout bubble go away but keep the pin?
If yes, then do this:

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号