I need a method like - (void)applicationDidFinishLaunching:(NSNotification *)aNotification
but I need it for my WebView IBOutlet WebView*webView;
. What is the right method?
What is the method for WebView finish loading?
2.8k Views Asked by Viper OS X At
3
There are 3 best solutions below
0

You have a few different options with WebView, as there are around 5 informal delegates which you can implement methods to:
For example, you might want to implement the frame load and resource load delegates to monitor the load progress and display status messages. Applications that use multiple windows may want to implement a user interface delegate. See the individual informal delegate protocols for more details: WebFrameLoadDelegate Protocol Reference, WebPolicyDelegate Protocol Reference, WebResourceLoadDelegate Protocol Reference, and WebUIDelegate Protocol Reference.
I find WebFrameLoadDelegate to be the easiest, just set yourself as the delegate:
[webView setFrameLoadDelegate:self];
Then implement this method:
- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
It's in
UIWebViewDelegate
protocol.