Can anyone provide any sample code/instructions for implementing draggable pins in OS 4.0 using the MapKit framework?
Can anyone provide any sample code/instructions for implementing draggable pins in OS 4.0 using
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sure thing buddy (yes I’m talking to myself),
In your custom annotation add:
This satisfies the requirement of implementing setCoordinate, as mentioned inhttp://developer.apple.com/iphone/library/documentation/MapKit/Reference/MKAnnotationView_Class/Reference/Reference.html#//apple_ref/occ/instp/MKAnnotationView/draggable
In your MapView delegate add:
and in your AnnotationView set draggable to true, so for example:
I think that was everything that I did to get it working. Tell me if you have troubles.