views:

270

answers:

1

In my viewForAnnotation delegate, I create a MKAnnotationView with leftCalloutaccessory as a info button. When the info button is tapped, I want to replace it with a UIActivityIndicator. So in the calloutAccessoryTapped delegate, I wrote view.leftCalloutaccessoryView = [UIActivityIndicator indicatorWithStyle:UIActivityIndicatorWhite];

The callout accessory seems to change, but it seems like the view doesn't get updated immediately.

That's when the callout accessory gets hidden (by tapping another pin) and is re-opened, I see a spinner. But otherwise, I don't.

I tried calling [view setNeedsdisplay] and [view setNeedsLayout] and [view layoutsubviews] as well but in vain.

Any suggestions/pointers?

A: 

I would consider removing and re-adding your annotation. It seems a little heavy handed, but might work.

Paul Lynch