iphone - 如何隐藏 MKAnnotationView 标注?

标签 iphone sdk mkannotation mkannotationview callouts

我试图在不触摸引脚的情况下隐藏 AnnotationView,这可能吗? 谢谢!

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

最佳答案

您只想让标注气泡消失但保留图钉吗?
如果是,则执行以下操作:

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

关于iphone - 如何隐藏 MKAnnotationView 标注?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2918154/

相关文章:

ios - 我的注释未在 PIN 码中显示副标题

iphone - 更改引脚设计

ios - 应用程序在后台使用 CoreBluetooth 进行通信

ios - 卫星 View 如何在详细 View Controller 中实现,在触摸 MKPinAnnotation 标注时显示

node.js - 使用 Node.js 创建新的 Confluence 页面

iphone sdk 3.2 到 4.0 Nib 编辑

iphone - 在标签中显示NSNumber

iphone - iOS 不同类型的方法签名

android - 使用适用于 Android 的 Qualcomm AR SDK 对标记进行远程跟踪

ios - 2个MKA注释之间的距离?