I've tried:
- (void) webViewDidFinishLoad:(UIWebView *)webView1{
}
- (void) webViewDidFinishLoad:(UIWebView *)webView2{
}
Errors are that I can't redefine the same method.
If I have to use the same method, I need to figure out some way of identifying one webView from the other, how would I do this?
Cheers
The reason why
- (void) webViewDidFinishLoad:(UIWebView *)webView
passes a webview is so that you know which webview finished loading. You have a couple of options.1.
2.
and add webview1 and webview2 as properties to your controller. (i.e. you need the @property line and a @synthesize line)
You need to keep a reference to them when you create them programmatically OR add outlets for them from Interface Builder. That way you'll have instance variables you can compare to the
webView
method argument to see which one has finished loading. You only need one method for this, and you may want to read up on the subject.