Reputation: 53
Im my iphone mapview application when i click on the annotation images it get change into pin. Can anyone please tell me how can i correct it?
My idea is to display a image instead of custom pin, even though it is clicked.
Upvotes: 0
Views: 1469
Reputation: 16543
When you click on a annotation this delegate will be called
- (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..
}
If my assumption is wrong then post your code here related annotations, So you can get better answers
Upvotes: 1