1
我正在混合ios应用程序,我想使用wkwebview而不是uiwebview,因为在wkwebview他们修复了很多性能问题,通过uiwebview,速度WKWebview起源null不允许通过访问控制允许来源
NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"html"];
NSString* htmlString = [NSString stringWithContentsOfFile:htmlFile encoding:NSUTF8StringEncoding error:nil];
[webView loadHTMLString:htmlString baseURL: [[NSBundle mainBundle] bundleURL]];
ca你发布了一些代码? – Misha