I wonder whether there is any tricks to do a “screen capture” a UIWebView in the background? To clarify more, I am able to capture the UIWebView using:
UIGraphicsBeginImageContext(webView.frame.size);
[webView.layer renderInContext: UIGraphicsGetCurrentContext()];
viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
theImageView.image = viewImage;
but I really have to the UIWebView displayed on the screen in order to capture it, I just wonder whether I can do this in the background?
Thanks,
Lawrence
Yes you can capture webview. But it will capture only the visible portion of the screen.
For example if your web views height will be more then 480 (iphone) then you can not capture the portion that is 480+.