I have searched the web and tried this a couple ways now but I have a CSS file within my XCode project and a UIWebView which has the html written in it's controller.
I need to get the WebView to recognize the CSS file and use it when the view is shown to the user. I cannot depend on the application having access to internet so I have tried every method I have seen which does not depend on it. The following is what I have so far and it does not work:
style.css is located in supporting files
NSString *html = @"<html><head><link rel=\"stylesheet\" type=\"text/css\"
href=\"style.css\" ><title>Words</title><link rel=\"stylesheet\" type=\"text/css\"
href=\"style.css\" /></head><body><table cellpadding=\"0\" cellspacing=\"0\"
border=\"0\"
width=\"100%\" class=\"resource-table\"><tr><th width=\"20%\">Reference/Performance
Level</th><th width=\"20%\">Words</th><th width=\"20%\">Words</th><th
width=\"20%\">Words</th><th width=\"20%\">Highly Effective</th></tr><tr><td><p
class=\"bold\">Words</p><p>Words</p></td><td><ul class=\"normal\"><li>Words</li></ul>
</td><td><ul class=\"normal\"><li>Words</li></ul></td><td><ul class=\"normal\">
<li>Words</li></ul></td><td><ul class=\"normal\"><li>Words</li></ul></td></tr><tr><td>
<p class=\"bold\">Domain 4f P. 107</p><p>4-Decision Making</p></td><td><ul
class=\"normal\"><li>Words</li></ul></td><td><ul class=\"normal\"><li>Words</li></ul>
</td><td><ul class=\"normal\"><li>Words</li></ul></td><t<ul class=\"normal\">
<li>Words</li></ul></td></tr><tr><td><p class=\"bold\">Words</p></td><td></td><td>
</td><td></td><td><ul class=\"normal\"><liWords</li><li>Words</li></ul></td></tr>
</table></body></style></html>";
NSString *path = [[NSBundle mainBundle] bundlePath];
NSURL *baseURL = [NSURL fileURLWithPath:path];
[webView loadHTMLString:html baseURL:baseURL];