【发布时间】:2012-10-01 17:34:45
【问题描述】:
我正在使用 Phonegap2.1。我的 AppDelegate.m 文件中有 webViewDidFinishLoad 方法。在以前的 phonegap 版本中,它曾经被自己调用。现在,它根本没有被调用。我需要在某处分配代理吗?
- (void)webViewDidFinishLoad:(UIWebView *)theWebView
{
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];
}
// Black base color for background matches the native apps
theWebView.backgroundColor = [UIColor blackColor];
return [ self.viewController webViewDidFinishLoad:theWebView ];
}
【问题讨论】:
标签: iphone ios cordova uiwebview