I am trying to get the HTML source code of a UIWebView without reloading it (for example, doing another loading, for example [NSData dataWithContentsOfURL:(NSURL*)URL] ) or running NSURLRequest. Looking through the title and documentation of the UIWebView, there seems to be no way to access the currently loaded NSData source. Did I miss something?
[NSData dataWithContentsOfURL:(NSURL*)URL]
The reverse should do what you want. That is, load the URL into the NSData object and then load the UIWebView from this object using – loadData:MIMEType:textEncodingName:baseURL:
– loadData:MIMEType:textEncodingName:baseURL:
UIWebView can execute javascript code, so this may work.
NSString *html = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.outerHTML"];
Source: https://habr.com/ru/post/1312854/More articles:Problems building on TFS 2010 and resolving dependencies - msbuildReplacing a C ++ ActiveX component with a .NET implementation? - c #question about closing a stream / socket in java - javaQt creator, paste the menu at the specified location in the menu bar - c ++How to debug why a VB6 application using my .NET ActiveX control is not logging for events? - c #String Manipulation: Separating Separated Data - javaDoes jquery require a timestamp for GET calls in IE7? - jquerydelphi vs c # post returns different lines - utf problem? - c #https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1312858/remove-all-of-file-type-from-tortoise-svn-repository&usg=ALkJrhjj_bjvvMGCiY3BmnEOIbANDEujVwefficient circular arc drawing algorithm? - algorithmAll Articles