Ios – How to change the callout bubble color in MapView annotation

iosmkmapviewobjective c

I want to be able to display a bluish bubble(default one is black) for callout for an annotation.

Wherever I search I only get samples to implement viewForAnnotation delegate method, but that only changes the annotationView not the bubble at the top.

However I wanted the pinColor to be green so I did override this method and here is the code.
Can I do something else to provide a backgroundImage for callOut or change the tintColor for it ?

-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation
{
    MKPinAnnotationView *annView=[[[MKPinAnnotationView alloc]
                                  initWithAnnotation:annotation reuseIdentifier:@"pin"] autorelease];
    annView.pinColor = MKPinAnnotationColorGreen;
    [annView setEnabled:YES];
    [annView setCanShowCallout:YES];

    return annView;

}

Here is how it looks right now:

enter image description here

Here is how I want to make it look like:

enter image description here

Best Answer

On iOS7, you can use the tintColor property on the mapView to change the color of the disclosurebutton.