How to Hide MKAnnotationView Callout?

假如想象 提交于 2019-12-12 07:45:09

问题


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

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

回答1:


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];
    } 
}


来源:https://stackoverflow.com/questions/2918154/how-to-hide-mkannotationview-callout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!