开发者

Catch UIWebview reloads

is there any way to get informed, when a UIWebview has loaded a new page? The documentation doesn't list a delegate for this.In my case, I want to know, when UIW开发者_JAVA技巧ebview is done with navigation in iUI pages.

Best Regards,

Stefan


variant A: i cannot understand what do you want. variant B: you didn't see method like

- (void)webViewDidFinishLoad:(UIWebView *)webView

it is called every time webview finishes loading new content


... what Morion said, only I think this method might be more along the lines of what he is looking for:

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType

It gets called every time the user clicks on a link.

Please see the UIWebViewDelegate docs: http://developer.apple.com/iphone/library/documentation/uikit/reference/UIWebViewDelegate_Protocol/Reference/Reference.html


the shouldStartLoadWithRequest message is sent to the delegate every time the webview loads a new page. So you should try there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜