Сначала объявите NSMutableArray в файле .h вашего viewController.
Вроде так:
NSMutableArray *checkedRows;
Измените свой метод didSelectRow следующим образом:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if ([checkedRows containsObject:indexPath]) {
[checkedRows removeObject:indexPath];
}
else {
[checkedRows addObject:indexpath];
}
[self.tableView beginUpdates]; //Just for animation..
[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
[self.tableView endUpdates];
}
И в вашем методе cellForRow добавьте:
if ([checkedRows containsObject:indexPath]){
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
else {
cell.accessoryType = UITableViewCellAccessoryNone;
}