PDA

View Full Version : Does UIWebView support WebResourceLoadDelegate




binjaja
Nov 25, 2008, 11:40 AM
I want to get details on the resources that WebKit loads during a page load. I don't think the iphone UIWebView supports all the delegate protocols that WebView does because when I add the delegate methods to my code, they get an error because they cant find (WebView *) For example, I add:

- (id) webView : (WebView *) sender identifierForInitialRequest : (NSURLRequest *) request fromDataSource : (id) dataSource {


and it fails obviously , because I'm using UIWebView. Changing (WebView*) to (UIWebView*) compiles fine, but the method is never called.






I'm trying to make an internal copy of a web page as I read it using UIWebView. I need to capture all of the image files so that I can reproduce the original html file when I am offline. Any ideas how to do that? I was going to use the WebResourceLoadDelegate to capture the image file URL's and the actual image files...but I don't know if I can...