Export UIWebView content to NSData? iPhone

What I'm trying to do is get the full UIWebView content (text, images and CSS) in one litte package. I realized that NSData would be the best way to do this. Or is there another compressed version?

+3
iphone uiwebview
source share
1 answer

It is probably late enough to answer this, but I realized that you can get all the data from the request that you made using NSCachedURLResponse as such:

 NSCachedURLResponse* response = [[NSURLCache sharedURLCache] cachedResponseForRequest:[webView request]]; NSData* data = [response data]; 
+5
source share

All Articles