URL filtering for UIWebView on the iPhone

Posted by Zac Altman on Stack Overflow See other posts from Stack Overflow or by Zac Altman
Published on 2010-04-09T00:51:00Z Indexed on 2010/04/09 0:53 UTC
Read the original article Hit count: 623

Can someone please shed some light on how I would get this to work: http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/

I tried making the "FilteredWebCache.h" and "FilteredWebCache.m" files in my project, but it said that "FilterManager.h" did not exist. What am I meant to do with those files?

This I put in viewDidLoad:

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 
    NSString *docDir = [paths objectAtIndex:0];
    NSString *path =  docDir; // the path to the cache file
    NSUInteger discCapacity = 10*1024*1024;
    NSUInteger memoryCapacity = 512*1024;

    FilteredWebCache *cache = [[FilteredWebCache alloc] initWithMemoryCapacity:memoryCapacity  diskCapacity:discCapacity diskPath:path];
    [NSURLCache setSharedURLCache:cache];
    [cache release];

© Stack Overflow or respective owner

Related posts about iphone-sdk

Related posts about iphone