I am confused a little bit about settings table view cell accessories.
I have fixed two sections in my table
What I
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
UITableViewCell *newCell = [tableView cellForRowAtIndexPath:indexPath];
if (newCell.accessoryType == UITableViewCellAccessoryNone) {
newCell.accessoryType = UITableViewCellAccessoryCheckmark;
}else {
newCell.accessoryType = UITableViewCellAccessoryNone;
}
}
also you need to remove the checkmark accessory on cellForRowAtIndexPath
if ([selectedOptionsArray indexOfObject:cell.textLabel.text] != NSNotFound) {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}else{
cell.accessoryType = UITableViewCellAccessoryNone;
}