user431791
user431791

Reputation: 341

how to display text in UIWebVIew

I have a NSstring which stores the html text in it.

i want to display this string in uiwebview.

i am using this [self.webView loadHTMLString:mystring baseURL:nil]

i know this is wrong. can anybody tell me how can i display my nsstring in uiwebview?

Upvotes: 3

Views: 2562

Answers (1)

Thomas Clayson
Thomas Clayson

Reputation: 29935

[webView loadHTMLString:htmlString baseURL:[NSURL URLWithString:@"http://website.com"]]; should work fine.

make sure the script can access the webView object. :)

Upvotes: 4

Related Questions