我想知道爲什麼這不起作用請幫助我。 這裏是我的代碼如果不能使用索引路徑
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
*)indexPath
{
if (selectedIndexPath == indexPath) {
selectedIndexPath = nil;
} else {
selectedIndexPath = indexPath;
}
[self.tableView deselectRowAtIndexPath : indexPath animated : NO];
[tableView beginUpdates];
[tableView endUpdates];
}
什麼是selectedIndexPath類型/聲明? –
它是以前點擊過的索引路徑 – ohmprakash
它的類型是nsindexpath。 – ohmprakash