Comment puis-je obtenir un coords MKAnnotationView?
-
21-09-2019 - |
Question
J'ai une méthode comme ceci:
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
Avec cela, puis-je obtenir les coordonnées?
La solution
return view.annotation.coordinate;
- propriété
.annotation
: http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MKAnnotationView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40008207-CH1-SW7 - propriété
.coordinate
: http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MKAnnotation_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40008208-CH1-SW2
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow