views:

637

answers:

1

Hi,

I have written an application with a draggable annotation which I have added on top of a MKMapView. I've added a CLLocationCoordinate2D variable called myloc in my main view controller to store the coordinate (lat,lng) values whenever I drag the annotation. My question is how do I update the myloc property value in the super parent UIViewController class whenever the touch end event ends on the annotation? If someone can share some code on how to do this elegantly that would be appreciated.

Thanks

A: 

Take a look at the following blog post: MapKit annotation drag and drop with callout info update.

You will find individual code samples, a full project on github and references to the official Apple Documentation (first post here, cannot insert second link, see the blog post).

Good luck!

Sascha Konietzke