UIWebView加载本地html文件_html/css
来源:懂视网
责编:小采
时间:2020-11-27 16:28:26
UIWebView加载本地html文件_html/css
UIWebView加载本地html文件_html/css_WEB-ITnose:UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight-64)]; webView.backgroundColor=YYCToothWashViewBgColor; [self.view addSubview:webView]; //加载本地html文件 NSString *path = [[NSBundle mainBundle] b
导读UIWebView加载本地html文件_html/css_WEB-ITnose:UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight-64)]; webView.backgroundColor=YYCToothWashViewBgColor; [self.view addSubview:webView]; //加载本地html文件 NSString *path = [[NSBundle mainBundle] b

UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight-64)]; webView.backgroundColor=YYCToothWashViewBgColor; [self.view addSubview:webView]; //加载本地html文件 NSString *path = [[NSBundle mainBundle] bundlePath]; NSURL *baseURL = [NSURL fileURLWithPath:path]; //protocal html文件名称 html文件类型 NSString * htmlPath = [[NSBundle mainBundle] pathForResource:@"protocal" ofType:@"html"]; NSString * htmlCont = [NSString stringWithContentsOfFile:htmlPath encoding:NSUTF8StringEncoding error:nil]; [webView loadHTMLString:htmlCont baseURL:baseURL];
UIWebView加载本地html文件_html/css
UIWebView加载本地html文件_html/css_WEB-ITnose:UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight-64)]; webView.backgroundColor=YYCToothWashViewBgColor; [self.view addSubview:webView]; //加载本地html文件 NSString *path = [[NSBundle mainBundle] b