Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想要做的是UIWebView在一个小包中获取完整的内容(文本、图像和 CSS)。 我认为NSData这将是最好的方法。还是有另一个更压缩的版本?
UIWebView
NSData
可能来不及回应这个问题,但我发现你可以从你使用 NSCachedURLResponse 发出的请求中获取所有数据,如下所示:
NSCachedURLResponse* response = [[NSURLCache sharedURLCache] cachedResponseForRequest:[webView request]]; NSData* data = [response data];