移除某个图像的缓存

2019-04-15 15:32发布

NSDictionary *useInfo = [[NSUserDefaults standardUserDefaults] objectForKey:@"userInfo"];
NSString *key = [[NSURL URLWithString:useInfo[@"pic"]] absoluteString];         [_avatarView setImage:[UIImage imageWithContentsOfFile:AvatarPath]];         // 移除缓存文件         [[SDImageCache sharedImageCache] removeImageForKey:key];         // 缓存新的头像文件 //        [[SDImageCache sharedImageCache] storeImage:_atavarView.image forKey:key toDisk:YES];                  [_avatarView setImageWithURL:[NSURL URLWithString:CheckNull(useInfo[@"pic"])] placeholderImage:nil];