Here’s another in the ‘handy if you need it’ category — ever want to drag and drop an MKMapView pin? Well then, MapKitDragAndDrop is for you:
MapKitDragAndDrop is designed to bring drag and drop support to MapKit on iPhone platform, with just one single lightweight DDAnnotation and DDAnnotationView, users are able to drag and drop annotation pin and get the new coordinate…
- Support both iPhone OS 3.1.x, 3.2 and iOS 4 at the same time, in the same source code.
- Use iOS 4 MapKit built-in draggable support (Yes, you get Retina Display high resolution support for free!)
- Use legacy MapKit techniques to create draggable annotations on iPhone OS 3.1.x and 3.2.
- Use Core Animation to create pin effects you saw in built-in Maps.app on iPhone OS 3.1.x and 3.2.
- Use modern runtime, Objective-C 2.0 ABI, and LLVM 1.5 compiler.
And speaking of that last point, if you really want to be as out there on the cutting edge and all that, check out this post on necessary compiler magic:
If you wan to enable Objective-C 2.0 ABI in modern runtime (so that you can use synthesized by default feature), you need to add following flag in your $OTHER_CFLAGS:
the tricky bit being that’s just one argument, not two as the naïve observer might suspect, so if you add your flags in Xcode you could run into issues. Yet another good argument for .xcconfig files, in our opinion.
On the subject of MKMapView helpers, check out MTDirectionsKit if directions are needed!