简体   繁体   中英

Annotation MapKit Automation

I have my app running with 2 annotations for now.

They are hardcoded in with latitude and longitude.

How do I make it so that I let the user add the annotations and drop a pin where they wish and for my app to recognize this and save where they drop it? Any ideas or links please.

I believe that this is accomplishable by having a btn that when pressed creates a new instance of the annotation pin with draggable properties listed as

MyPin.draggable = YES;

My question is: how do I code the class so that the new instance can be created when needed.. and as many as are needed. (5, 8, 29 etc.)

hope this makes sense, if not, then I am basically looking to create something similar to the drop pin feature in google maps on iphones.

Here you have an example Link

It uses a gesture recognizer. The only problem is that it does not retrieve the address.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM