★ TouchArcade needs your help. Click here to support us on Patreon.

Using Maps within my app...

08-28-2009, 04:12 PM
Joined: Apr 2009
Location: London, UK
Posts: 317
Send a message via ICQ to cramzy Send a message via Skype™ to cramzy
Using Maps within my app...

Hi guys,

I've been struggling with this for quite some time, but I can't seem to find the way...

I have an app where I want to put maps (into the app...OS 3). But how do I do that? I used IB to put MKMapView, but then what? I would essentially link it to object in my view controller, but in the view controller there is no class MKMapView so I can't create the object...

Any help how to use maps within the app?

Thanks a lot!

08-28-2009, 06:31 PM
Joined: Mar 2009
Location: Singapore
Posts: 1,770
Send a message via AIM to kohjingyu
You hve to declare an MKMapView IBOutlet in your .h file, and then link it in interface builder. You have to do something like:

mapView = [[MKMapView alloc] ...];
You could look at this tutorial: http://nexes-code.blogspot.com/2009_07_01_archive.html

Hope that helps.