I need to extract the contents of the title tag from an HTML page displayed in a UIWebView. What is the most robust means of doing so?
I know I can do:
Here is Swift 4 version, based on answer at here
func webViewDidFinishLoad(_ webView: UIWebView) { let theTitle = webView.stringByEvaluatingJavaScript(from: "document.title") }