[英]uitableview have a checkmark on edit mode when selected
when I use edit mode in my tableView,I found there is a round check mark on the left.but i don't want it. 当我在tableView中使用编辑模式时,我发现左侧有一个圆形的复选标记 。但是我不想要它。 how can i delete it ?
我如何删除它 ?
My editingStyleForRowAtIndexPath
is UITableViewCellEditingStyleNone
我的
editingStyleForRowAtIndexPath
是UITableViewCellEditingStyleNone
self.tableView.editing = YES;
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{
return UITableViewCellEditingStyleNone;
}
i already uncheck the " Show Selection on Touch " in xib. 我已经取消选中xib中的“ 触摸时显示选择 ”。 and i check the " Multiple Selection During Editing "
我检查了“ 编辑期间的多项选择 ”
It's a result of having tableView.allowsMultipleSelectionDuringEditing = true
, which has to be false
(or uncheck multiple selection during editing ). 这是因为
tableView.allowsMultipleSelectionDuringEditing = true
,它必须为false
(或在编辑过程中取消选中多个选择 )。 If you do want to have multiple-row selection enabled without the checkmark, you may have to set cell.accessoryView
to something like an empty image. 如果确实要启用多行选择而没有选中标记,则可能必须将
cell.accessoryView
设置为诸如空图像之类的内容。 To change the color of the checkmark, you set the cell's tintColor. 要更改选中标记的颜色,请设置单元格的tintColor。
设置tableView.allowsMultipleSelectionDuringEditing = NO
If you dont want that round shape checkmark you can do programatically by selecting multiple rows in tableview. 如果您不希望该圆形复选标记,可以通过在表视图中选择多行来以编程方式进行。 Simply follow below codes :
只需遵循以下代码:
Result : 结果:
I hope you got output as you want. 希望您能得到想要的输出。 if you still facing any problem let me know.
如果您仍然遇到任何问题,请告诉我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.