title: Custom UITableViewCell weird behavior with fast scroll
body: <p>I have a grouped tableView with 5 sections. The tableView uses a custom UITableViewCell with 2 label and 4 buttons in it. When i select 1 or more buttons at the beginning of the table and then scroll to the end of it, i find those buttons selected in the last cell, sometimes in the second-last. It seems to me that there is some issues with the <code>dequeueReusableCellWithIdentifier</code> but i cannot figure it out.
  For clarity i have this code in my viewDidLoad:</p>
  
  <pre><code>// table cell
  UINib *nib = [UINib nibWithNibName:@"SMRateMeetingTableViewCell" bundle:nil];
  [self.tableView registerNib:nib forCellReuseIdentifier:@"SMRateMeetingTableViewCell"];
  </code></pre>
  
  <p>and this in my cellForRowAtIndexPath:</p>
  
  <pre><code>SMRateMeetingTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"SMRateMeetingTableViewCell" forIndexPath:indexPath];
  // Configure the cell...
  if (cell == nil) {
      cell = [[SMRateMeetingTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"SMRateMeetingTableViewCell"];
  }
  </code></pre>
  
  <p>Pretty basic stuff.
  I added some screens for better understanding.
  <img src="https://i.stack.imgur.com/E4t4X.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/Jg30b.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/LsNYE.jpg" alt="enter image description here"></p>
  
  <p>EDIT: adding buttons code.
  For an easier analysis let's assume i only have 1 button in the custom cell
  This is the table view code:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  SMRateMeetingTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"SMRateMeetingTableViewCell" forIndexPath:indexPath];
  // Configure the cell...
  if (cell == nil) {
      cell = [[SMRateMeetingTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"SMRateMeetingTableViewCell"];
  }
  //the tag will allow me to understand in which section is the button
  cell.firstYesButton.tag = indexPath.section;
  
  [cell.firstYesButton addTarget:self action:@selector(firstYesButtonAction:) forControlEvents:UIControlEventTouchUpInside];
  
  return cell;
  }
  </code></pre>
  
  <p>And the relative method associated to the button:</p>
  
  <pre><code>-(IBAction)firstYesButtonAction:(id)sender
  {
  UIButton *senderButton = (UIButton *)sender;
  [self.votesArray replaceObjectAtIndex:(senderButton.tag*2) withObject:[NSNumber numberWithInt:1]];
  //NSLog(@"%@", self.votesArray );
  }
  </code></pre>
  
  <p>An this is the code in the implementation file of the custom cell:</p>
  
  <pre><code>@implementation SMRateMeetingTableViewCell
  
  - (void)awakeFromNib {
  // Initialization code
  [self.firstYesButton setImage:[UIImage imageNamed:@"yesRateDisable.png"]   forState:UIControlStateNormal];
  }
  
  - (IBAction)firstYesAction:(id)sender {
  [self.firstYesButton setImage:[UIImage imageNamed:@"yesRateEnable.png"] forState:UIControlStateNormal];
  }
  </code></pre>