Is it possible to load a WebView with the text from a NSString? If I save the string content into a file and then use something like:
[[main_browser mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"file:///Volumes/AA/myfile.txt"]]];
It works, but how can I do it without writing the content into a file?
Yeah you can load a NSString into a webview, just look at the following method:
You can also open files from the disk this way by creating a NSString object and then loading it into the webview. However using loadRequest might be better ( as it is doing the same thing, but then internally ).
If you want to write a NSString to a file you can:
Did you actually take a look at the NSString class reference? It is pretty clear there.