ios - Using PINRemoteImage to populate CollectionViewCell Images -


i make network call in viewdidload objects (first 25), make call in willdisplaycell rest of objects. i'm using pinremoteimage in code below. works, problem scroll through collection view, cell have 1 picture picture appear on it. how can improve ui? thought updatewithprogress supposed deal using blur until image loaded doesn't seem working?

  override func collectionview(collectionview: uicollectionview, cellforitematindexpath indexpath: nsindexpath) -> uicollectionviewcell {            let cell = collectionview.dequeuereusablecellwithreuseidentifier(reuseidentifier, forindexpath: indexpath) as! pincollectionviewcell           if let pinimageurl = self.pins[indexpath.row].largestimage().url {              cell.pinimage?.pin_updatewithprogress = true             cell.pinimage?.pin_setimagefromurl(pinimageurl, completion: ({ (result : pinremoteimagemanagerresult) -> void in                  if let image = result.image {                     self.imagearray.append(image)                 }              }))           } 

the problem i'm reusing cells, wasn't resetting image. added cell.pinimage?.image = nil above. once found out problem added uiactivityviewindicatorviewto cell , stop when image comes in.


Comments