UITableView Setting some cells as “unselectable”

后端 未结 16 1452

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:24

    Set the table cell's selectionStyle property to UITableViewCellSelectionStyleNone. That should prevent it from highlighting, and you can also check that property in your tableView:didSelectRowAtIndexPath:.

提交回复
热议问题