I have HTML Content which was being displayed in a UITextView
. The next iteration of my app is display the HTML contents into a UIWebView
This example shows how we can se HTML
into UIWebView
and
func someFunction() {
uiWebView.loadHTMLString("", baseURL: nil)
uiWebView.delegate = self as? UIWebViewDelegate
}
func webViewDidFinishLoad(_ webView: UIWebView) {
//ready to be processed
}
Do not forget to extend a class from UIWebViewDelegate
and nil the delegate