How to save content of UIWebView as image
I want to save the content UIWebView
as an image. The code I saved only saves the web page content that is visible on the screen.
- (IBAction)saveImage:(id)sender
{
UIGraphicsBeginImageContext(webCanvas.frame.size);
[self.webCanvas.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage =UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, nil,nil,nil);
}
I want it to save the entire webpage in UIWebView
, including the part of the website that is not displayed on the screen. Is it possible?
0
source to share
1 answer
You will need to check: -
Convert UIWebview content to UIImage when the webview is larger than the screen
How to take a screenshot from the screen in full screen, including parts of the screen? Hope this helps you.
0
source to share