I am using this function for rendering MKMapView instance into image:
@implementation UIView (Ext)
- (UIImage*) renderToImage
{
UIGraphicsBeginImageContext
Try using UIGraphicsBeginImageContextWithOptions
instead of UIGraphicsBeginImageContext
:
UIGraphicsBeginImageContextWithOptions(self.frame.size, NO, 0.0);
See QA1703 for more details. It says:
Note: Starting from iOS 4, UIGraphicsBeginImageContextWithOptions allows you to provide with a scale factor. A scale factor of zero sets it to the scale factor of the device's main screen. This enables you to get the sharpest, highest-resolustion snapshot of the display, including a Retina Display.