views:

46

answers:

0

Hey guys, I'm working with a UITableViewController, and I have a section of code as follows:

Subject *subject = [[context subjects] objectAtIndex:[indexPath row]];

cell.textLabel.text = [subject name];
cell.showsReorderControl = YES;

return cell;

This code is in the UITableViewDataSource method that returns an UITableViewCell for an index path. (I'm sure you're all familiar with it.)

I'm noticing a strange bug where even though [subject name] is returning "A", the cell is actually being displayed with "B". I have no clue what's going on, I have placed breakpoints and used GDB to examine the code at that location. See the attached screenshots, the first is a breakpoint as I was scrolling to the last row, where the issue occurs. The second is after the code has executed, and the cell is being displayed.

alt text alt text