1

I have got data from the server like 'my name is &nbsp john'. I want to display in UIWebView like 'my name is john'.
How to display it?

1
  • Are you from ahmedabad, india? Commented Jan 28, 2010 at 9:38

2 Answers 2

1

Try the - loadHTMLString:baseURL: method.

Sign up to request clarification or add additional context in comments.

Comments

0

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]]];

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.