View Full Version : UITableViewCellAccessoryDisclosureIndicator image disappears after I delete a row.

Mar 2, 2009, 10:50 AM
I have a UITableViewController, and I have added the UITableViewCellAccessoryDisclosureIndicator on the Cell Views. What I have noticed is that when I delete a row from the table, then one of the other rows loses the indicator. When I scroll the view, the missing indicator moves to another row. I'm guessing that I'm loosing a pointer to the indicator or something, but I'm not sure how it is happening.

Here is most of my code from the UITableViewCell:

- (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) {
... Setting up other parts of cell

self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;

return self;

And here is the code that deletes the row:

[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];

Any idea's what is happening?