I am having trouble in calling a method that I defined screenCap by a UIWebView. Basically, I have two UIWebView declared: firstWebView and secondWebView.
I ran a javascript to extract some HTML loaded by the firstWebView and display it to the secondWebView by calling [secondWebView loadHTMLString: extractString baseURL:nil];
What I want to do is after secondWebView is loaded, I want to call
[secondWebView screenCap: self];
The screenCap method is defined by:
-(void) screenCap: (UIWebView *)webView; {
UIGraphicsBeginImageContext(webView.frame.size);
[webView.layer renderInContext: UIGraphicsGetCurrentContext()];
viewImage; = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
theImageView.image = viewImage;
NSLog(@"write Image done!");
I, however got a warning “UIWebView may not respond to ‘-screenCap’ and of course the screenCap never got called. can anyone direct me how to fix this problem?
There’s nothing wrong in the code of the ScreenCap method.
But instead of doing
write