Ios5 如何在表视图中隐藏自定义复选标记

Ios5 如何在表视图中隐藏自定义复选标记,ios5,uitableview,xcode4.2,Ios5,Uitableview,Xcode4.2,我有一个UITableView,希望在选中(点击)行时能够显示自定义复选标记,但是,如果在任何其他行上有复选标记,则必须将其隐藏。最好的方法是什么?如果。。。似乎根本不起作用,它不会像我想的那样隐藏和取消隐藏复选标记 提前谢谢。 -保罗 通过此代码可以获得tableview的每个单元格 UITableViewCell*单元格=[product_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:clickedTag分区:0]]; 为循

我有一个UITableView,希望在选中(点击)行时能够显示自定义复选标记,但是,如果在任何其他行上有复选标记,则必须将其隐藏。最好的方法是什么?如果。。。似乎根本不起作用,它不会像我想的那样隐藏和取消隐藏复选标记

提前谢谢。 -保罗


通过此代码可以获得tableview的每个单元格 UITableViewCell*单元格=[product_table cellForRowAtIndexPath:[NSIndexPath indexPathForRow:clickedTag分区:0]]; 为循环制作一个

for(int i=0;i<[tabledata count];i++){
cell.imageViewDidSelectRow.hidden = YES; 
}

for(int i=0;如果所有数据都是我的核心数据实体的一部分,那么在实体中作为一个新的BOOL属性跟踪它,然后解析这些值,并在选择行时修改对象是否有意义?答案如下:
1) Maintain a tag in class level as an NSIndexPath variable. 
2) Whenever a cell is selected make note of the indexPath and reload the table view. 
3) In cellForRowAtIndexPath delegate check for this variable and set marks accordingly.
4) This will not be costly if you have the cell with less information.
for(int i=0;i<[tabledata count];i++){
cell.imageViewDidSelectRow.hidden = YES; 
}