My question is the following. I'm a bit confused about the path of resources to be loaded in a UIWebView. I'ld like to make my links active. For the moment the WebView isn't getting resources (.css, .html) that are in other folders while the link between them is correct. Do you know how to fix t开发者_如何学Pythonhis ? I'm currently doing like this
NSString* path = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"];
NSString* htmlString = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
[WebView loadHTMLString:htmlString baseURL:[NSURL fileURLWithPath:path]];
Thanks for reading me !
Can you try like this, it may be useful:
[webview loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"webPage" ofType:@"html"]]]];
精彩评论