Is it possible to cache resources loaded in an iPhone UIWebView?

前端 未结 6 859
时光取名叫无心
时光取名叫无心 2020-12-04 18:36

I have a simple app loading a site optimized for the iPhone in a UIWebView.

Problem is, caching does not seem to work:

[webView loadRequ         


        
6条回答
  •  一整个雨季
    2020-12-04 19:21

    You should be able to subclass NSURLCache and substitute it for the shared cache used by the UIWebView as described in this Cocoa with Love article: Substituting local data for remote UIWebView requests

    For another approach have a look at Drop-in offline caching for UIWebView (and NSURLProtocol).

提交回复
热议问题