title: UITableView Repeating Content
body: <p>I know this is an age old problem, but I have a little twist on it this time.</p>
  
  <p>As the title says, my UITableView is repeating content. In this case, the background colour changes on a cell it isn't supposed to when scrolling it off and back on screen.</p>
  
  <p>I understand this is probably due to reusing cells, but my issue is I can't just give each cell a unique cell identifier, as I have built my cell in my Storyboard, which requires it to be typed in there.</p>
  
  <p>So how can I get around this problem, while keeping my cell designed inside my storyboard?</p>
  
  <p>A little code:</p>
  
  <pre><code>    static NSString *cellIdentifier = @"Cell";
          SLDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
  
          if (!cell)
          {
              cell = [[SLDetailCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
          }
  
      [cell setBackgroundColor:[UIColor slateBackgroundGrey]]; //Set standard background colour
      [cell.titleLbl setText:[self.tableTitles objectAtIndex:indexPath.row]]; //cell titles from an array (static data I made)
  
      //This will occur for each cell, here are two examples
      if ([cell.titleLbl.text isEqualToString:@"Aircraft"])
      {
          NSString *detailText = @"";
          if (!self.flight.aircraft) detailText = @"N/A";
          else detailText = self.flight.aircraft.name;
          [cell.detailLbl setText:detailText];
      }
      if ([cell.titleLbl.text isEqualToString:@"Delete"])
      {
          UIView *containerView = [cell.titleLbl superview];
          [containerView setBackgroundColor:[UIColor triggerRed]];
          [cell.titleLbl setTextColor:[UIColor whiteColor]];
          [cell.disclosureIndicator setHidden:YES];
          [cell.detailLbl setText:@""];
      }
  </code></pre>
  
  <p>In the case of the delete cell I change the colour properties of the cell.</p>
  
  <p>Subclassing <code>prepareForReuse</code> to reset cell data fails to stop repeating data, as does setting the colour in every individual cell if statement (like you see above).</p>
  
  <p>Thanks.</p>