Displaying contact name when a pin is clicked on the mapview

116 Views Asked by At

I'm using the MapKit framework and I have used pins to display the exact address location of the contacts in my addressbook. Till now everything is working fine. But when i click on a pin I need to show the name of the contact, that particular pin represents. Right now I cant figure out a way to do this.

2

There are 2 best solutions below

0
On BEST ANSWER

Setting the "title" and "subtitle" members of an MKAnnotation should do the job.

You can take a look at the MKMapView sample for Speedy I just wrote.

0
On

Search on google : Subclass MKPinAnnotation