美文网首页iOS_Vinch
#WebView加载的本地html

#WebView加载的本地html

作者: Vinch | 来源:发表于2017-07-04 09:14 被阅读5次

单纯的Mark一下,以供入坑的小伙伴脱坑

  NSString *jsFilePath = [[NSBundle mainBundel] pathForResource:@"XXX"ofType:@"js"];
  NSString *jsStr = [[NSString alloc]initWithContentsOfFile:jsFilePath encoding:NSUTF8StringEncoding error:nil]
  UIWebView *webView = [[UIWebView alloc]init];
  [webView stringByEvaluatingJavaScriptFromString:jsStr];
  [xxx addSubview:webView];

相关文章

网友评论

    本文标题:#WebView加载的本地html

    本文链接:https://www.haomeiwen.com/subject/tbethxtx.html