I have this code for flashing an image on a map as a part of MKAnnotationView:
UIView* containerView = [mapView viewForAnnotation:enemy];
UIImageView* redCircle = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Red_half_circle.png"]];
[UIView transitionWithView:containerView
duration:2.9
options:UIViewAnimationOptionAutoreverse&&UIViewAnimationOptionRepeat
animations:^{ [containerView addSubview:redCircle];}
completion:^(BOOL finished){[redCircle removeFromSuperview]; }];
As such, nothing happens when I run it. But!!! If I remove the "completion" code block and replace it with NULL, then at least the animation adds the subview. Maybe the options have something to do with it?
Question: How do you flash an image in MKAnnotationView?
Thanks much.