I have this this code:
NSURL *mainBundleURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]];
[webView loadHTMLString:htmlFile baseURL:mainBundleURL];
I know the htmlFile is correct. It has inside:
<link rel="stylesheet" type="text/css" href="stylesheet.css">
I also know the stylesheet.css in in the mainBundle. I checked the project.app contents.
Problem is that is the webview is empty. But if I use base Url as nil:
[webView loadHTMLString:htmlFile baseURL:nil];
The webview shows the content, but without the css file.
I have no idea why this is not working. Thanks in advance.
NSURLRequest?