collectionCell 里包含个 imageView
刷新时 cell 闪烁一下 咋回事。。
performBatchUpdates:completion:也闪
reloadIndexPath:也闪
reloadSections:也闪
好急。。
刷新时 cell 闪烁一下 咋回事。。
performBatchUpdates:completion:也闪
reloadIndexPath:也闪
reloadSections:也闪
好急。。

1 kitalphaj Oct 15, 2016 刷新当然会闪。。 |
3 tuimaochang Oct 15, 2016 这…… |
4 paradoxs Oct 15, 2016 要给 Placeholder 不然肯定会闪的, 要么你就用 sdwebimage |
5 cielpy Oct 15, 2016 你是 reload 了特定的 indexPath 吗 |
6 heqichang Oct 15, 2016 同求解答:之前也遇到过一样的问题,用的 sdwebimage ,设了 placeholder , reload 后有时会闪有时不会。 |
7 DingSoung Oct 15, 2016 prepare for reused 函数不要清图片,如果取图片需要很长时间 用个默认图顶着,如果图片设置后会触发自动布局也会引起 |
8 tutuge Oct 16, 2016 via iPhone 就是因为设置了 placeholder 才会闪 |
14 niselover OP @paradoxs Photo *photo = self.allPhotos[indexPath.item]; OneAlbumCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath]; cell.imageView.image = nil; cell.isEditing = collectionView.allowsMultipleSelection; [cell.imageView sd_setImageWithURL:[NSURL URLWithString:photo.thumImageUrl]]; |
15 yongSir Oct 16, 2016 不想让他闪 可以指定 reload 的 index ,也就是不管不刷新 同时在想办法关闭动画,这种老问题 so 上有很多答案 比如,给个参考: ```swift CATransaction.begin() CATransaction.setDisableActions(true) // update or reload here CATransaction.commit() ``` |
16 yongSir Oct 16, 2016 不全部刷新 打错了 |
19 ashoka Oct 17, 2016 via Android cell.imageView.image=nil 去掉试下 |
20 kobe1941 Oct 17, 2016 ``` // 去掉 reloadData 时的动画 [UIView performWithoutAnimation:^{ [weakSelf.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]]; }]; ``` 之前写关于 UICollectionView 的 demo 的时候确实有遇到这种情况,我是这么解决的: [点这里]( https://github.com/kobe1941/HFRefresh/blob/master/HFRefresh/HFCollectionViewController.m) |
21 yiplee Oct 17, 2016 可以不用 collectionView 的 reload ,把要刷新的 cell 通过 indexPath 取出来,然后直接对 cell 做操作。 |