UITableViewCellAccessoryDisclosureIndicator image disappears after I delete a row.

Discussion in 'iOS Programming' started by jaycyn94, Mar 2, 2009.

  1. macrumors newbie

    Joined:
    Jul 18, 2007
    #1
    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:

    Code:
    - (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:

    Code:
     [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
    Any idea's what is happening?
     

Share This Page