问题
What I am trying to do is get the UIWebView
s full content (Text, images, and CSS) in one litte package.
I figured NSData
would be the best way to do this. Or is there another more compressed version?
回答1:
Probably late enough to respond to this, but I figured out you can get all the data from the request you made with NSCachedURLResponse as such:
NSCachedURLResponse* response = [[NSURLCache sharedURLCache]
cachedResponseForRequest:[webView request]];
NSData* data = [response data];
来源:https://stackoverflow.com/questions/13888933/export-uiwebview-full-content-to-nsdata-iphone