0
我有我的手机3000图像。当我在手机中运行MWPhotoBrowser时。如果我刷卡太快。它会崩溃。MWPhotoBrowser崩溃时,我有太多的图像和刷卡太快
我有我的手机3000图像。当我在手机中运行MWPhotoBrowser时。如果我刷卡太快。它会崩溃。MWPhotoBrowser崩溃时,我有太多的图像和刷卡太快
在MWGridViewController中,cellForRow中的代码。通过使用通知来请求图像的原始方法。现在我用block来改变它。它适合我。
//my code
[photo requestImageForAsset:photo.asset size:CGSizeMake(cell.width * 2, cell.height * 2) resizeMode:PHImageRequestOptionsResizeModeFast completion:^(UIImage *image, NSDictionary *info) {
if(image){
photo.loadingInProgress = NO;
cell.imageView.image = image;
[cell hideLoadingIndicator];
cell.selectedButton.hidden = !_selectionMode;
[cell hideImageFailure];
}
}];
//original code
UIImage *img = [_browser imageForPhoto:photo];
if (img) {
[cell displayImage];
} else {
[photo loadUnderlyingImageAndNotify];
}