0
私はmainviewcontroller webviewを再度読み込み、webviewをリロードする必要があります。起動しないself.viewcontroller.webview.delegate = self + PhoneGap + secondtime
APPDELGATE:
- (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;
}
Webdelegateは、インサートに発射されていません。あなたのAppDelegateはWebViewののwebViewDidFinishLoadedためのデリゲートであるため、それ自体をWebViewのない、
return [self.viewController webViewDidFinishLoad:theWebView];
:
return [self webViewDidFinishLoad:theWebView];
の代わり:
おかげ