2

In my demo application, I try to send a request to my test WebService,

and it will send me a JSON format data back.And the key is a string ,

then the value is HTML format data.I want to use the UITextView to show the content.

But the result is like this:

enter image description here

I want the content show to me is just like the HTML webpage,

but I dont know how to do with the HTML data.

Please help me with this, and I dont know how to write the code,

so there is no code to show to you. I am sorry about it.

Thank you in advance.

jxdwinter
  • 2,339
  • 6
  • 36
  • 56

1 Answers1

3

Instead of a UITextView, use a UIWebView: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html

Matias
  • 176
  • 4
  • 1
    Without having to parse the HTML and render the display, yes. If you're just looking to display the HTML and nothing else, a UIWebView is definitely the correct way to do it. – Matias Mar 20 '12 at 13:05
  • 1
    Yeah, I just want to display the HTML.Maybe your answer is the best way to do this. And I use the [self.webView loadHTMLString:data baseURL:url] function, it works! Thanks a lot! – jxdwinter Mar 20 '12 at 13:19