我有一個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