I have a table view in one of my viewcontrollers which gets set to edit mode using:
self.navigationItem.rightBarButtonItem = self.editButtonItem;
I’m also setting the cell’s editingAccessoryType to the appropriate UITableViewCellAccessoryType:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
NSString *cellLabel = [cellDetails objectAtIndex:indexPath.row];
NSString *cellData = [movieDictionary objectForKey:cellLabel];
cell.textLabel.text = [[NSString alloc] initWithFormat:@"%@ %@", cellLabel, cellData];
cell.editingAccessoryType = UITableViewCellAccessoryCheckmark;
cell.accessoryType = UITableViewCellAccessoryNone;
return cell;
}
within cellForRowAtIndexPath. However, when I tap the Edit button, the accessories don’t show. The table is being set to edit mode (setEditing is being called). Does anyone know what I’m missing out on?
Do you implement the setEditing?