Xcode 4.2 "The cell reuse identifier in nib (Cell) does not match the identifier used to register nib (ThisCell)"

I am trying to use the new StoryBoard Xcode 4.2 feature and keep getting this error when using a table view with a custom cell.

cell reuse indentifier in nib (Cell) does not match the identifier used to register the nib (ThisCell)

I set the class of my custom cell to my custom UITableViewCell class and set the identifier to "ThisCell" in IB.

 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"ThisCell"; //TableViewCell *cell = (TableViewCell*)[tableView dequeueReusableCellWithIdentifier:@"ThisCell"]; TableViewCell *cell = (TableViewCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; return cell; 

I have no idea where "Cell" comes from. Any ideas? I tried loading a custom cell into another project, and it seems to be working fine, I just can't find the documentation for this error to find out what I messed up in the current project.

thanks

+4
source share
1 answer

The error message states that your ad is identified as a โ€œcellโ€ - you need to look in the xib file that defines your custom cells to configure the cell reuse identifier and set it to ThisCell ... or just change ThisCell to Cell in this code.

+12
source

All Articles