如何在UITableViewCell上选择编辑AccessoryView



我正在使用allowMultipleSelection = YES将表视图置于编辑模式。所以,它把那些大圆圈放在左边,表示一行被选中或没有被选中。

按下单元格将选择行。但是按下圆圈没有任何作用。

我设置了cell.editingAccessoryView.userInteractionEnabled = YES;,但没有结果。

是我丢失了某个属性,还是我们不应该按下editingAccessoryView?

谢谢。

如果左边的"小圆圈"是指右边的附件视图按钮,那么您需要实现方法

- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath

否则,如果你指的是+和-图标,那么看看UITableView:检测点击'-';按钮在编辑模式

最新更新