title: What can I do to stop CollectionView refreshing the cell which was displayed when scrolling?
body: <p>I am using UICollectionView to display images. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>- (WaterFallCollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
      WaterFallCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:collectionViewCellIdentifier forIndexPath:indexPath];
      NSURL *itemTBURL = [NSURL URLWithString:self.items[indexPath.item][@"image"][@"thumbnailLink"]];
      [cell setNeedsLayout];
      cell.imageView.imageURL = itemTBURL;
  
      return cell;
  }
  </code></pre>
  
  <p>My problem is, for example, it has totally 10 images in collectionView, first I scroll down to last one, which the first image in collectionView will be invisible, when I scroll up to the first one, it has the refreshing effect and the program will jump into the method I showed. It looks like when the cell turns from invisible to visible state, iOS will force to call the method. I want to store the previously displayed cell, so when you scroll up, it won't have the refresh effect. What should I do? I know Twitter, Pinterest, Facebook they looks like wont' refresh the previous cells when you scroll up. I know it is feasible, just don't know how to do that. Thanks in advance.</p>