I have got data from the server like 'my name is   john'. I want to display in UIWebView
like 'my name is john'.
How to display it?
views:
127answers:
2
A:
To load remote html file:
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com"]]];
To load local html file:
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]isDirectory:NO]]];
To load html string:
[webView loadHTMLString:@"<img src=test.png>" baseURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]]];
Ruchir Shah
2010-01-28 09:33:43