xcode - 通过滚动启用禁用与单元格的交互

时间:2016-07-29 06:39:24

标签: xcode uitableview

从另一个视图控制器,我需要阻止表视图单元格的交互,但仍然允许滚动属性。

我用过:

table.userInteractionEnabled  = NO;
table.scrollEnabled = YES

但userInteractionEnabled禁用所有操作,包括滚动。

有没有办法从表格属性中做到这一点?

1 个答案:

答案 0 :(得分:0)

从属性检查器

  • 选择

    enter image description here

以编程方式: -

cell.selectionStyle = UITableViewCellSelectionStyle.None // In CellforRowAtIndexPath