有两个:
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
// [cell setSelectionStyle:UITableViewCellSelectionStyleNone]; (这种是没有点击后的阴影效果)
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.selected = NO; (这种是点击的时候有效果,返回后效果消失)
本文介绍了两种取消UITableView中UITableViewCell点击选中阴影的方法。第一种是在cell被选中时设置其selectionStyle为None,第二种则是直接将cell的selected属性设为NO。
522

被折叠的 条评论
为什么被折叠?



