To get a snapshot of a view:
-(UIImage *)pictureForView:(UIView*)view { UIGraphicsBeginImageContext(view.frame.size); CGContextRef ctx = UIGraphicsGetCurrentContext(); [view.layer renderInContext:ctx]; UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); return image; }
What for the whole presentation - you need to cut out the piece that you need. Or maybe just focus the map in the right place and make the maximum increase. Then the image of the whole view when resizing the thumbnail can be quite good.
To crop the map image to the desired location:
UIImage* mapImage = [self pictureForView:self.mapView]; MKCoordinateRegion mapRegion = self.mapView.region;
source share