我的问题如下。我对要在 UIWebView 中加载的资源路径有点困惑。我想让我的链接处于活动状态。目前,WebView 没有获取其他文件夹中的资源(.css、.html),而它们之间的链接是正确的。你知道如何解决这个问题吗?我目前正在这样做
NSString* path = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"];
NSString* htmlString = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
[WebView loadHTMLString:htmlString baseURL:[NSURL fileURLWithPath:path]];
谢谢你读我!