It depends how you're downloading the HTML.
I would suggest that you use NSURLConnection
and NSURLRequest
to form a HTTP GET request and download the HTML that way.
You should implement the delegate methods for NSURLConneciton
. You shoudl allocate an NSMutableData
object to store the data you download, and append new data to it in -connection:didReceiveData:
Then once -connectionDidFinishLoading:
is called, you can convert your NSData
object into an NSString
using
[[NSString alloc] initWithData:myData encoding:NSUTF8StringEncoding];
This will give you the raw HTML of the page, which you can then push into a UIWebView
, using loadHTMLString:baseURL:
or pass into a UITextView
with setText:
for editing.