¿Cómo puedo obtener coordenadas de una MKAnnotationView?
-
21-09-2019 - |
Pregunta
Tengo un método como este:
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
El uso de este, puedo obtener las coordenadas?
Solución
return view.annotation.coordinate;
-
.annotation
propiedad: http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MKAnnotationView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40008207-CH1-SW7 -
.coordinate
propiedad: http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MKAnnotation_Protocol/Reference/Reference.html#//apple_ref/doc/uid/TP40008208-CH1-SW2
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow