title: iphone : uitableview : contents of a cell change on scrolling
body: <p>I have an array which I am using to furnish the contents of custom cell in table view
  I dont know whats wrong but when I scroll a tableview the contants oc cell changes dynamically</p>
  
  <p>Please help me to fix this</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  
  static NSString *MyIdentifier = @"MyIdentifier";
  MyIdentifier = @"tblCellView";
  NSString *offendersImagePath = [self applicationDocumentsDirectory];
  //NSLog(@"%@", dbPath);
  offendersImagePath=[offendersImagePath stringByAppendingPathComponent:@"Images"];
  
  
  CustomCell *cell = (CustomCell *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier];
  if(cell == nil) {
      [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil];
      cell = aCustomCell;
      aCustomCell=nil;
  }
  
  NSMutableArray *tempArray;//=[[NSMutableDictionary alloc] init];
  
  tempArray=[offendersNamesList objectAtIndex:indexPath.row];
  //NSLog(@"%d",indexPath.row);
  
  offendersImagePath=[offendersImagePath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.jpg",[tempArray objectAtIndex:0]]];
  NSLog(offendersImagePath);
  [[cell offendersImageView] setImage:[UIImage imageWithContentsOfFile:offendersImagePath]];
  [cell.offendersNameLbl setText:[tempArray objectAtIndex:1]];
  [cell.offendersViolation setText:[tempArray objectAtIndex:2]];
  //[tempDictionary release];
  
  //[cell setLabelText:[arryData objectAtIndex:indexPath.row]];
  return cell;
  </code></pre>
  
  <p>}</p>