1
如何在tableView中取消先前選擇的行?我無法找到解決方案,以獲得oldIndexPathdidSelectRowAtIndexPath:如何獲取舊的indexPath以取消勾選複選標記?
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *newCell = [tableView cellForRowAtIndexPath:indexPath];
if (newCell.accessoryType == UITableViewCellAccessoryNone) {
newCell.accessoryType = UITableViewCellAccessoryCheckmark;
}
}
謝謝,我已經找到了這個解決方案 – LIAL