If anyone wants to implement a flash effect, here is my code:
(add a white, opaque, fullscreen view panel, zero alpha, over the mapView)
- (void)exportMapViewImage {
//export image of mapView
UIGraphicsBeginImageContextWithOptions(self.mapView.frame.size, NO, 0.0f);
CGContextSetShouldAntialias(UIGraphicsGetCurrentContext(), NO);
[self.mapView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
// implement a flash
self.flashView.alpha = 1;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
self.flashView.alpha = 0;
[UIView commitAnimations];
//save image to photo album
UIImageWriteToSavedPhotosAlbum(screenshot,self,@selector(image:didFinishSavingWithError:contextInfo:),nil);
}