How to capture iPhone screen with animating UIWebview?

164 Views Asked by At

I've just created code for screen video capturing..its perfectly working using UIView.but if i use UIWebview than the capture screen video is displayed with stuck..I know the reason.the reason is while using web view

[[self.layer presentationLayer] renderInContext:mycontext];

is not working..and my app is crashed

so,if presentation layer is not working than video will be stuck. and using this line

[self.layer renderInContext:mycontext];

the screen captureing is working,but video is displaying with stuck.

this is the code,while user browse any web-site in his or her mobile.

UIGraphicsBeginImageContextWithOptions(self.bounds.size, YES, 0.0);

CGContextRef mycontext = UIGraphicsGetCurrentContext();

if([[self.layer presentationLayer] respondsToSelector:@selector(renderInContext:)])
{
    [[self.layer presentationLayer] renderInContext:mycontext];
}
else
{
    [self.layer renderInContext:mycontext];
}


UIImage* image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

while scrolling the webview and captured the video,than the capture screen video is displayed with stuck..

is there any solution?

0

There are 0 best solutions below