I want to take screen shot of window and use that image as background view for new view controller. My problem is, that image is some what blur in retina display because the image should be 640X1136. But the following code returns image with size of only 320X568.
Note: If I use the apple's private API UIGetScreenImage()
it returns the image in size 640X1136.
-(UIImage*)getScreenShot:(CALayer*)layer
{
UIGraphicsBeginImageContextWithOptions(layer.frame.size, NO, 0.0);
[layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
[self getScreenShot:self.window.layer];
Is any way to get the screen shot image in size 640X1136 with out using apple's private API?