From here: Loading resources from a relative path using local html in uiwebview
Drag the resource into the xcode project (I dragged a folder named www from the Finder window), you will get two options: "create groups for any added folders" and "create folder links for any added folders". Select the option "Create link folder ..". Use the code below. It should work like a charm.
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"www"]]; [webview loadRequest:[NSURLRequest requestWithURL:url]];
Now all your relative links (e.g. img / .gif, js / .js) in html should be allowed.
source share