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*) getImageFromViewUIView*) 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.
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*) getImageFromViewUIView*) 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.