5
我正在使用HJCache
lib在我的iPhone应用程序中缓存图像。使用HJCacheClasses缓存图像错误
我收到以下错误,但不是所有图像,只是第一个(不)出现。
HJMOFileCache
未能加载文件移动到准备文件/Users/joao__garcia/.../Library/Caches/imgcache/ready/http:__uni.....jpg
它没有问题加载下面的图片。有人知道发生了什么事吗?
我得到的目录是这样的:
objMan = [[HJObjManager alloc] init];
NSString* cacheDirectory = [NSHomeDirectory() stringByAppendingString:@"/Library/Caches/imgcache"] ;
HJMOFileCache* fileCache = [[HJMOFileCache alloc] initWithRootPath:cacheDirectory];
objMan.fileCache = fileCache;
然后:
managedImage = [[HJManagedImageV alloc] initWithFrame:CGRectMake(96, 88, 185, 167)];
managedImage.url = [NSURL URLWithString:[NSString stringWithFormat:@"http:...",video.thumb_video]];
NSLog(@"%@", managedImage.url);
[objMan manage:managedImage];
// [objMan performSelectorOnMainThread:@selector(manage:) withObject:managedImage waitUntilDone:YES];
NSLog(@"image %@", managedImage.image);
[managedImage sizeToFit];
playVideoViewButton.backgroundColor = [UIColor colorWithPatternImage:managedImage.image];