如何隐藏MKAnnotationView标注? [英] How to Hide MKAnnotationView Callout?

查看:239
本文介绍了如何隐藏MKAnnotationView标注?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图隐藏AnnotationView而不接触引脚,可能吗?
谢谢!

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]]) { 
    } 
}


推荐答案

你是否只想让标注泡泡消失而保留销钉?

如果是,那就这样做:

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

这篇关于如何隐藏MKAnnotationView标注?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆