开发者

Implementing MKMapView didRemoveAnnotationViews method?

开发者 https://www.devze.com 2023-03-04 16:34 出处:网络
There\'s a method of MKMapViewDelegate protocol: - (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views

There's a method of MKMapViewDelegate protocol:

- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views

Which I'm using for custom pin dropping animations, though there's no method for "remove" (didRemoveAnnotationViews) action to implement custom animations when annotation views are being removed.

Has anyone figured out a workaround for that?

Thanks!开发者_StackOverflow社区


[mapview deselectAnnotation:[mapview.selectedAnnotations objectAtIndex:0] animated:YES];

or

[mapview deselectAnnotation:calloutMapAnnotationView.annotation animated:YES]; where calloutMapAnnotationView is the callout bubble object of selected custm pin.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号