我有一个UITableiew,我希望能够显示一个自定义复选标记,当该行被选中(点击),但是,如果有任何其他的复选标记行,它必须被隐藏。做这个的最好方式是什么? IF ...似乎根本不起作用,它不会像我想的那样隐藏和取消隐藏复选标记。如何隐藏表视图中的自定义复选标记
在此先感谢。 - 保罗。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
home_2_CustomCell *cell = (home_2_CustomCell*)[tableView cellForRowAtIndexPath:indexPath];
//This will hide the selected row...
cell.imageViewDidSelectRow.hidden = YES;
// if (cell.imageViewDidSelectRow.hidden = NO){
// cell.imageViewDidSelectRow.hidden = YES;
// }
}
在这里找到答案:http://stackoverflow.com/questions/5959950/iphone-uitableview-cellaccessory-checkmark – 2012-03-13 01:57:09