Search This Blog

Monday, 17 September 2012

How to know when a webview finish loading a page in xcode

Hello friends,
                its been a long time since i posted, so here it is a new one you will find awkward solutions for this as using some "theguide" 3rd party API and all but it is as simple as a button in xcode......i was working on it and i thought why dont we use webviewdelegate for this and i found it finally.....here it is


Step 1:

Include UIWebViewDelegate in your header file:

Step 2:

And,then over ride this function in your .m file:

-(void)webViewDidFinishLoad:(UIWebView *)webView{
    //Do Something
}

this function will be called when a WebView finish loading a page , you can do anything in it.....Remeber to set the webview delegate to self.

No comments:

Post a Comment