UITableView Setting some cells as “unselectable”

后端 未结 16 1499

How can I set the UITableView\'s cell property to be unselectable? I don\'t want to see that blue selection box when the user taps on the cell.

16条回答
  •  没有蜡笔的小新
    2020-12-12 18:37

    Had this problem, too, tried everything already mentioned. The final trick, which got rid of the "blue flash" at selecting a table cell was adding this line:

    self.myTableView.allowsSelection = NO;
    

    Not sure whether it was this one line or everything combined, but as total grand result I get no more blue selection or even the blue flash. Happy!

提交回复
热议问题