iPhone Map Kit Tutorial
Here is a quick iPhone Map Kit tutorial that I showed during my presentation at the Vancouver iPhone developers meetupin September 2009. I have changed a few things based on the audience’s feedback.
Step 1 – Show the World Map
- Create a new iPhone OS project: a Navigation based Application called “MapDemo”.
- Remove the RootViewController.xib file from the project (choose “Also move to trash”).
- Change the base class of the RootViewContoller in RootViewController.h to UIViewController.
- Add the MapKit framework. Click the Project->Edit Active Target “MapDemo” menu. From the Target Info dialog choose the General tab, and click the “+” button on the bottom. Select the MapKit framework and add it.

- Double click to open MainWindow.xib in Interface Builder. Set the nib window to list view mode, expand the tree and select RootViewContoller.
In the Attributes Inspector window remove the NIB name.
- In the MainWindow.xib window select Navigation Controller, and in the Attributes Inspector uncheck Shows Navigation bar.

- Drag and drop a map view on top of the Navigation Controller view.

- Save, compile and run.


