views:

22

answers:

0

I want to take a snapshots of a specific area of UIWebView by giving x, y coordinates and dimensions. Is there any way I can achieve this?

I am using the current code but I am only able to get the image of visible area on screen only. How can I get the image of the area which is not visible?

UIGraphicsBeginImageContext(rect.size);
    [webView.layer renderInContext:UIGraphicsGetCurrentContext()];
    UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();