How to take a screenshot of UIwebView with a vedio inside?

How to take a screenshot of UIwebView with a vedio inside?

Jonyblank

New Member
Thread Starter
Joined
Feb 22, 2012
Messages
1
Reaction score
0
Hello everyone:
I want to take a screenshot of a UIWebview that have a vedio on playing inside.
When I get the screenshot,the range of vedio in the screenshot is black.I want to know
how can I get the screenshot with the vedio picture rather than a black block.

follwing is my method:

-(UIImage*) getImageFromView:(UIView*) view
{
UIGraphicsBeginImageContext((webView.frame.size));
NSLog(@"%f,%f",self.view.frame.size.width,webView.frame.size.height);

[webView.layer renderInContext:UIGraphicsGetCurrentContext()];

UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();

UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);
return viewImage;


}

Thanks for any help.
 
Back
Top