嗨,我在本地(文档)中有高分辨率图像。现在我想以缩略图大小列出所有本地图像。我正在使用 UICollectionView 显示图像,同时加载将图像大小从高分辨率调整为缩略图。所以collectionView缺乏滚动速度。现在我对如何缓存调整大小的缩略图图像感到困惑。哪一个是最好的选择。我使用 SDWebimages 从 Web 下载和缓存图像。谢谢
- (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
// NSLog(@"%i path", indexPath.row);
CollectionViewCell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"CollectionViewCell" forIndexPath:indexPath];
ImageData *imgData = [self readFromLocal:indexpath.item];
UIImage *thumb = [self resizeImgToTumb:imgData.image];
[cell.imgView setimage:thumg];
return cell;
}