UIWebView *webView = ...
[webView loadHTML:@"" baseURL:url];
1. 先将资源文件拷到项目中去,
2. url 设置为 [NSURL fileURLWithPath:[[NSBundle mainBundle] resourcePath]];
3. 选中target,在Build Phrase标签页中,将JS脚本文件从Compile Resources中移除,再加到Copy Bundle Resources中去
UIWebView *webView = ...
[webView loadHTML:@"" baseURL:url];
1. 先将资源文件拷到项目中去,
2. url 设置为 [NSURL fileURLWithPath:[[NSBundle mainBundle] resourcePath]];
3. 选中target,在Build Phrase标签页中,将JS脚本文件从Compile Resources中移除,再加到Copy Bundle Resources中去