How to display text in UIWebVIew

I have an NSstring that stores HTML text in it.

I want to display this line in uiwebview.

I use this [self.webView loadHTMLString: mystring baseURL: nil]

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

+3
source share
1 answer

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

make sure the script has access to the webView object. :)

+4
source

Source: https://habr.com/ru/post/1761711/


All Articles