Not firing self.viewcontroller.webview.delegate = self+PhoneGap+secondtime
<p>I have to reload the mainviewcontroller webview second time and reload the webview.</p>

<p>APPDELGATE:</p>

<pre><code>- (void) webViewDidFinishLoad:(UIWebView*) theWebView 
{


    // only valid if FooBar.plist specifies a protocol to handle
    if (self.invokeString)
    {
        // this is passed before the deviceready event is fired, so you can access it in js when you receive deviceready
        NSString* jsString = [NSString stringWithFormat:@"var invokeString = \"%@\";", self.invokeString];
        [theWebView stringByEvaluatingJavaScriptFromString:jsString];

    }else {



         if([loginComplete isEqualToString:@"1"] ){


            NSString *page = @"intro.html";
            NSString* jsString = [NSString stringWithFormat:@"loadParams('%@','%@','%@');", at,userfbid,page];
            [theWebView stringByEvaluatingJavaScriptFromString:jsString];

        }

        else {
            NSString *page = @"friends.html";
            NSString* jsString = [NSString stringWithFormat:@"loadParams('%@','%@','%@');", at,userfbid,page];
            [theWebView stringByEvaluatingJavaScriptFromString:jsString];
        }


        // Black base color for background matches the native apps
        theWebView.backgroundColor = [UIColor grayColor];

        return [self.viewController webViewDidFinishLoad:theWebView];
    }




 -(void)insert{

        self.viewcontroller.webview.delegate=self;

        }
</code></pre>

<p>Webdelegate is not firing in insert.</p>

<p>Thanks</p>
