设置tableviewcell不让选中

来源:互联网 发布:西安淘宝代运营公司 编辑:程序博客网 时间:2024/04/27 22:44

1:cell.userInteractionEnabled = NO;

2:[cell setSelectionStyle:UITableViewCellSelectionStyleNone];


这两种方法都能实现不让cell有点击事件。

但如果cell中有button第一个方法也会让button失去点击事件。