【发布时间】:2009-07-28 12:59:29
【问题描述】:
我有一个包含许多注释的 MKMapView。选择引脚显示标注并按下附件会弹出一个新的视图控制器到堆栈上。但是,当我从那个新的 VC 中按回来时,标注仍然是打开的。如何关闭它?
我试过了
if([[myMapView selectedAnnotations] count] > 0)
{
//deselect that annotation
[myMapView deselectAnnotation:[[myMapView selectedAnnotations] objectAtIndex:0] animated:NO];
}
但这不起作用。 selectedAnnotations 在数组中确实有一个条目,因此它确实进入了该语句,但标注未关闭。
我需要在我的 MKAnnotation 实现或我的 MKPinAnnotationView 中添加一些东西吗?
【问题讨论】:
标签: iphone objective-c