title: UITableViewCell with checkbox repeating while scrolling
body: <p>I'm using a UITableView witha custom cell (xib). Each cell are lables and a checkbox (UIButton).</p>
  
  <p>I have 2 sections and 4 cells in each section. If I check the first cell of the first section, the forst cell of the second section will be check as well and I don't want. The problem: dequeueReusableCellWithIdentifier:CellIdentifier.</p>
  
  <p>I want to hold my cell identifier static.</p>
  
  <p>How can I fix this ?</p>
  
  <p>Here is the initializing of my array (for the content of my cells):</p>
  
  <pre><code>for(int i=0; i&lt;NUMBER_OF_CELL; i++){
  
      Account *model = [[Account alloc]init];
  
      [model setAccountName:[NSString stringWithFormat:@"Account %d",i]];
      [model setAccountNumber:[NSString stringWithFormat:@"Number %d",i]];
  
      [_accountArray addObject:model];
  
  }
  </code></pre>
  
  <p>Setting the content:</p>
  
  <pre><code>[[cell accountLabel] setText:_model.accountName];
  [[cell accountNumberLabel] setText:_model.accountNumber];
  </code></pre>
  
  <p><em><strong>EDIT:</em></strong></p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier = @"Cell";
      _model = [_accountArray objectAtIndex:indexPath.row];
  
      AccountCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      if (cell == nil) {
          NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"AccountCell" owner:self options:nil];
          cell = [topLevelObjects objectAtIndex:0];
      }
      // configure cell 
      [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
  
      [[cell accountLabel] setText:_model.accountName];
      [[cell accountNumberLabel] setText:_model.accountNumber];
      // checkbox ? 
  
      if(cell.isChecked){
  
          NSLog(@"Checked");
      }else{
          NSLog(@"No checked");
      }
  
      return cell;
  }
  </code></pre>
  
  <p>In an other class, I check if the checkbox is checked or not:</p>
  
  <pre><code>- (IBAction)checkbox:(id)sender {
  
      NSIndexPath *indexPath = [(UITableView *)self.superview indexPathForCell: self];
  
      if(self.isChecked == NO)
      {
          self.isChecked = YES;
          [_checkbox setImage:[UIImage imageNamed:@"checkbox_checked.png"] forState:UIControlStateNormal];        
      }
      else{
          self.isChecked = NO;
          [_checkbox setImage:[UIImage imageNamed:@"checkbox.png"] forState:UIControlStateNormal];
      }
  
  }
  </code></pre>
  
  <p>How can I distinguish each cell to avoid repeating checking ? </p>
  
  <p>Thank you so much!
  Best regards,</p>