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