tableviewcell的取消选中,高亮

1.取消多余cell的分割线

UIView *view = [UIView new];

    

    view.backgroundColor = [UIColor clearColor];

    

    [tableView setTableFooterView:view];

 

2.取消cell选中状态

代理 didselected

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

{

    // 取消选中状态

    [tableView deselectRowAtIndexPath:indexPath animated:NO];

}

 

3.取消cell点击时高亮状态

代理cell中

//取消cell的高亮状态

        cell.selectionStyle = UITableViewCellSelectionStyleNone;

原文地址:https://www.cnblogs.com/wskgjmhh/p/4602116.html