1
可有人请阐明我怎么能够让一些轻这个工作: http://www.icab.de/blog/2009/08/18/url-filtering-with-uiwebview-on-the-iphone/URL在iPhone滤波的UIWebView
我试图使“FilteredWebCache.h”和“FilteredWebCache.m”的文件在我的项目,但它说“FilterManager.h”不存在。我对这些文件意味着什么?
此我把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];