O'Reilly logo

iPhone Location Aware Apps by Example by Zeeshan Chawdhary

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — draggable annotations

We now look at adding draggable annotations to our Maps.

  1. We reuse the example from before, but rearrange the UI to look like the following image. This time, we add the mapView directly using the UI ToolBox.
    Time for action — draggable annotations
  2. We also create an IBOutlet as @property (strong, nonatomic) IBOutlet MKMapView *mapView; and connect the mapView from the Nib file to the outlet by keeping Ctrl clicked and dragging the MapView to the outlet.
    Time for action — draggable annotations
  3. As before, we define an MKPointAnnotation object annotation in our Hello_LocationViewController.h ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required