I am trying to get the HTML source of a UIWebView without re-downloading it again (a.k.a. do another download, such as [NSData dataWithContentsOfURL:(NSURL*)URL]
or launching an NSURLRequest. Browsing the UIWebView header and documentation, there seems to be no way of accessing the current loaded NSData of the source. Am I missing something ?
UIWebView can execute javascript code, so this can work it out.
NSString *html = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.outerHTML"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With