1

I have 3000 Images in my phone. When I running MWPhotoBrowser in my phone. And if I swipe too fast. It's going to crash.

Alan Luo
  • 159
  • 1
  • 13

1 Answers1

0

At MWGridViewController, the code in cellForRow. The original method to request images it by using notification. And now I change it by using block. It works good for me.

//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];
}
Alan Luo
  • 159
  • 1
  • 13