1

In the ipad app im planning to do, it will be all about loading web pages in UIWebView. I have a feature wherein I will display previews of the UIWebViews, more like thumbnails of these web pages. How do I do this? generating UIImage from these web pages would be cool... Hope someone can help me achieve this.

1 Answer 1

6
UIGraphicsBeginImageContext(yourWebView.bounds.size);
        [yourWebView.layer renderInContext:UIGraphicsGetCurrentContext()];
        UIImage *resultImageView = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();

this resultImageView will be your answer...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.