This code used to work. Is anyone else getting a white image instead of a screenshot of the map? UIGraphicsBeginImageContextWithOptions(self.mapView.frame.size, NO, 0.0f); CGContextSetShouldAntialias(UIGraphicsGetCurrentContext(), NO); [self.mapView.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); UIImageWriteToSavedPhotosAlbum(screenshot,self,@selector(image:didFinishSavingWithError:contextInfo:),nil);
Edit: I tried saving a normal UIView's image, and that works fine.I've also tried changing the opacity to YES, and scale to 1.0.