title: my custom collectionView is choppy when scrolling
body: <p>please i have create custom collectionView when load the images from document directory to collectionView Cell i can't scrolling fast my custom collectionView is choppy when scrolling i don't know why?
  please can anyone tell me what am doing on this problem </p>
  
  <p>the following my code :</p>
  
  <pre><code>func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
      let cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as! AlbumImagesCollectionViewCell
  
  
      if dictionaryOfSelectItem.count &gt; 0 {
          if dictionaryOfSelectItem[indexPath.row] == indexPath.row {
              cell.imageViewCheck.image = UIImage(named: "check.png")
          }else {
              cell.imageViewCheck.image = nil
          }
  
      }
  
          cell.imageViewCheck.image = nil
          dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
          dispatch_sync(dispatch_get_main_queue(), {
              if self.arrayOfImageUrl2.count &gt; 0 &amp;&amp; self.arrayOfImagesFromDocumentDirectory.count &gt; 0 {
                  cell.imageViewCell.image = self.ResizeImage(self.arrayOfImagesFromDocumentDirectory[indexPath.row], targetSize: CGSize(width: 140.0, height: 140.0))
                  cell.imageUrlLabel.text = self.arrayOfImageUrl2[indexPath.row]
              }
  
          })
      }
  
      return cell
  
  }
  </code></pre>
  
  <p>Thanks Advance</p>