1 xcode
我在地图上有一些Annotationview.我只是想检测用户触摸它时发生的事件.我想出了使用观察者,我在viewForAnnotation委托方法中为每个注释视图添加了观察者.我认为它会很完美,但还是有问题.annotationview的"selected"属性会意外地更改其值.有人告诉我如何解决这个问题.谢谢!
你应该看看MKMapViewDelegate有这个方法来实现:
-(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2165 次 |
| 最近记录: |