How can I make the cells transparent. I only want to show the selected cells with a checkmark which I have done:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)path {
UITableViewCell *cell = [tableView cellForRowAtIndexPath:path];
if (cell.accessoryType == UITableViewCellAccessoryCheckmark) {
cell.accessoryType = UITableViewCellAccessoryNone;
}
else {
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
}
and when I first create the cells I do that next line of code to get rid of the blue background
cell.selectionStyle = UITableViewCellSelectionStyleNone;
but I have a weird issue where it takes 2 clicks to add and remove the checkboxes. Maybe this is not the right way to do it?