Posts

Post not yet marked as solved
6 Replies
Thanks for your reply.I have a problem that the imageView in the cell will load another url image,so the imageView will flash.For Example:- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { TestCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"TestCollectionViewCell" forIndexPath:indexPath]; TestImageView *imageView = [cell getImageView]; imageView.url = self.data[indexPath.row]; return cell;}TestImageView have the property url to download the url image.(like SDWebImage)If `dequeueReusableCellWithReuseIdentifier` return another cell, the url will be diffrent and imageView will replace the current image with the url image.So the user will find the cell will splash one time if uicollectionview reloadData.If `dequeueReusableCellWithReuseIdentifier` can return the same cell, the url property will be equal and imageView will not replace current image.That's my problem.Thanks
Post not yet marked as solved
6 Replies
I have a problem that the imageView in the cell will load another url image,so the imageView will flash.For Example:- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { TestCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"TestCollectionViewCell" forIndexPath:indexPath]; TestImageView *imageView = [cell getImageView]; imageView.url = self.data[indexPath.row]; return cell;}TestImageView have the property url to download the url image.(like SDWebImage)If `dequeueReusableCellWithReuseIdentifier` return another cell, the url will be diffrent and imageView will replace the current image with the url image.So the user will find the cell will splash one time if uicollectionview reloadData.If `dequeueReusableCellWithReuseIdentifier` can return the same cell, the url property will be equal and imageView will not replace current image.That's my problem.Thanks