ios webview html在一个文件夹里如何引用
展开全部
NSString *htmlPath = [[NSBundle mainBundle] pathForResource:@" index" of type:@"html";
NSString *htmlString = [[NSString alloc] initWithContentsoffile:htmlPath encoding: NSUTF8StringEncoding error:nil];
[myWeb loadHTMLString: htmlString baseURL:[NSURL urlWithString htmlPath]];
NSString *htmlString = [[NSString alloc] initWithContentsoffile:htmlPath encoding: NSUTF8StringEncoding error:nil];
[myWeb loadHTMLString: htmlString baseURL:[NSURL urlWithString htmlPath]];
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询