How do I add a checkmark to a table view?
-
26-09-2019 - |
Question
I've put in this code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell * tableCell = [self.tableView cellForRowAtIndexPath:indexPath];
tableCell.accessoryType = UITableViewCellAccessoryCheckmark;
[tableView deselectRowAtIndexPath:(NSIndexPath *)indexPath animated:YES];
}
But for some reason, the checkmark doesn't appear. Could someone help?
Solution
Actaully, I figured it out, that's the right way to do it, its just it had a black bg so it was hard to see.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow