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];