iPhone Map Kit Tutorial
Here is a quick iPhone Map Kit tutorial that I showed during my presentation at the Vancouver iPhone developers meetup last Thursday. I have changed a few things based on the audience’s feedback. To contact me for training or software development please visit the website of my company Dynamic Leap Technology.
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.
March 9, 2010 at 5:47 pm
I am a newbie to iPhone development and am trying this tutorial. When trying step 7 of this part, the MainWindow.xib displays a message “parsed 1 source file but no classes were found or changed”. Am I missing anything?
August 16, 2011 at 11:46 pm
i want to learn how to put pins at the tap area on map? can anybody give me the complete sample code or even some hints?