I have some HTML strings and a remote CSS link. I want to load the HTML strings and add the CSS to it in my webView. How can I do it? Thanks!
[_webView loadHTMLString:htmlString baseURL:someurl];
You could either
fetch the CSS over the network (with e.g. NSURLConnection & friends)
load it with loadHTMLString: enclosed in <style>[...]</style> tags (e.g. [NSString stringWithFormat:@"<style>%@</style>", loadedCSSString])
or
use Javascript (stringByEvaluatingJavaScriptFromString:) inside the webview, create and insert a link tag:
var link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('href', '<your remote CSS link>');
document.head.appendChild(link);
The HTML must of course already be loaded when you do this.