
MKMapView Change Pin Color
Hi, in my iphone map view application, i displayed the image on annotation instead of custom pin. But however on click it changes to red color pin. Can any one please tell me how can i show the same image ever after it's taped.

MKMapView changes to Red Pin on Tapping
This is a MKAnnotationView issue. Use MKAnnotationView instead of MKPinAnnotationView. And set the custom image. It will fix the problem.
or See the code below...
- (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
{
//I think here you will be adding a annotation(my assumption)
[mapView addAnnotation:yourAnnotation];
//This will call viewForAnnotation again
}
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation
{
//If you didnt specify the a image for the annotation the default pin image will be assigned here..
}
Whenever we click on a annotation it call the delegate. So, you need to set your image into it.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.