把本地html目录添加到xcode
html资源显示蓝色文件夹
WKWebView加载本地html资源
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"www"];
NSURL *pathURL = [NSURL fileURLWithPath:filePath];
[self.webView loadRequest:[NSURLRequest requestWithURL:pathURL]];
如果不按照上面步骤,可能加载不到html资源