【发布时间】:2016-12-30 15:16:10
【问题描述】:
我想取消选择之前选择的行,再次选择此行。我只能在其他行中单击取消选择该行,但我想再次单击该行取消选择。我该怎么做?
这是我的代码:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self updateTableView];
}
- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self updateTableView];
}
- (void)updateTableView
{
[self.tableView beginUpdates];
[self.tableView endUpdates];
}
谢谢!!
【问题讨论】:
-
请在发布问题之前检查是否存在相关内容。 stackoverflow.com/questions/3968037/…
标签: objective-c uitableview cell