Loading HTML into a Cocoa app with WebView and change text
- by Domness
Right, so far I've got this for loading up a HTML file from within my app:
NSString *path1 = [[NSBundle mainBundle] pathForResource:@"file" ofType:@"html"];
NSString *html = [NSString stringWithContentsOfFile:path1 encoding:NSUTF8StringEncoding error:nil];
[[webView mainFrame] loadHTMLString:html baseURL:[NSURL fileURLWithPath:[[NSBundle mainBundle]bundlePath]]];
Which works loading the file up into the app's WebView. But I want to change some values in the HTML (or PHP if it works by using $_REQUEST/$_GET), for example, I have a table with some text in it and I want to change this text from an NSString etc.
How would I go about this?