title: Disappearing UITableViewCell on UITableView reloadRowsAtIndexPaths:
body: <p>I have a few UITableViewCells that I am loading from an XIB file. Everything is great until I call the [UITableView reloadRowsAtIndexPaths:withRowAnimation:] method when the cell disappears. When I call [UITableView reloadData] everything loads find, when I scroll the cell on and off the view it will also reappear also. Weird.</p>
  
  <p>I've also noticed that when I call [UITableView reloadRowsAtIndexPaths:withRowAnimation:] the UITableView will not try to reuse a cached cell and will try to get a new one with cell = [tableViewCells objectAtIndex:cellId];</p>
  
  <p>Here is my code:</p>
  
  <pre><code>- (void)viewDidLoad
  {
      ...
      // the objects from the XIB files are loaded onto an NSArray instance variable at viewDidLoad
      tableViewCells = [[NSBundle mainBundle] loadNibNamed:@"ProfileTableViewCell" owner:nil options:nil];
      ...
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      int cellId = /* some logic to get the correct cellID */
      NSString *CellIdentifier = [NSString stringWithFormat:@"ProfileTableViewCell_%d", cellId];
      ProfileTableViewCell *cell = (ProfileTableViewCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      if(cell == nil)
      {
          cell = [tableViewCells objectAtIndex:cellId];
          // additional work to setup subviews for the cell
          [cell prepareSubviews];
          [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
      }
  }
  </code></pre>
  
  <p>and just in case here is some of the stuff I'm doing in [ProfileTableViewCell prepareSubviews]</p>
  
  <pre><code>- (void)prepareSubviews
  {
      ...
      [self.containerView.layer setCornerRadius:3];
      [self.containerView.layer setBorderColor:UIColorFromRGB(0xCDCDCD).CGColor];
      [self.containerView.layer setBorderWidth:2.0];
      [self.containerView.layer setMasksToBounds:YES];
      [self.containerView.layer setShouldRasterize:NO];
      [self.containerView.layer setRasterizationScale:[UIScreen mainScreen].scale];
      ...
  }
  </code></pre>
  
  <p>Thanks in advance to the awesome person that can help me out.</p>