Hey everyone,
I am learning about using the checkmark cell accessory and am wondering why the contents of my cell is disappearing when toggling it.
Here is my code:
+ (void) toggleCheckmarkedCell:(UITableViewCell *)cell {
if (cell.accessoryType == UITableViewCellAccessoryNone)
cell.accessoryType = UITableViewCellAccessoryCheckmark;
else
cell.accessoryType = UITableViewCellAccessoryNone;
}
And here is didSelectRowAtIndexPath:
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
[RootViewController toggleCheckmarkedCell:cell];
The checkmark is toggling on/off and is visible but the main contents of the cell disappears. Can anyone explain why this is happening?
Thank you,