title: Set value of progress bar in collection view through delegate function
body: <p>I have a collection view. I want to update progress bar in its cell. I have subclassed the cell. Problem is that I am getting values of progress bar from a delegate function. This delegate function gives the progress bar values and I want to update the specific progress bar in the collection view. 
  Right now, it is updating the progress bar, but it is not updating the correct progress bar. It is updating different progress bars at the same time, probably because of dequeueReusableCellWithReuseIdentifier.</p>
  
  <p>Right now, I am using following in the delegate to set value of Progress bar. This is being called every time progress updates
  This is the delegate method : </p>
  
  <pre><code>- (void)setProgress:(NSString *)pID andProgress:(float)progress
  {
       int index = [arr_PID_inCollectionView indexOfObject:pID];
  
      Cell *cell = (Cell *)[self.collectionView cellForItemAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0]];
      [cell.progressBar setProgress:progress];
  }
  </code></pre>
  
  <p>I have also tried to give tag to progress bars, but I can not find the correct place to give tags, because if I give in "cellForItemAtIndexPath" function, they again get reseted when collection view moves.</p>
  
  <p>Can you please suggest what is the best way to update progress bar, assuming that progress bar values are coming from delegate. Also, a snippet of code will be appreciated. </p>