如何获取 MKAnnotationView 的坐标?
-
21-09-2019 - |
题
我有一个这样的方法:
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
使用这个,我可以获得坐标吗?
解决方案
return view.annotation.coordinate;
.annotation
财产: http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MKAnnotationView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40008207-CH1-SW7.coordinate
财产: http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MKAnnotation_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40008208-CH1-SW2
不隶属于 StackOverflow