如何取消TableViewCell的选中状态

2025-04-07 19:54:00
推荐回答(1个)
回答1:

在UITableView里面,选择了某一个cell以后,点击立刻取消该cell的选中状态,可以使用如下方法:

-
(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
*)indexPath
{
//some functions
......

//
取消选中状态
[tableView deselectRowAtIndexPath:indexPath animated:NO];
}