UITableView Setting some cells as “unselectable”

后端 未结 16 1481

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

    There is another simple way to avoid the selection appearing as blue.

    Select a cell you don't want to appear as blue.

    Then select the attributes inspector (the shield icon next to the ruler icon on the properties view on the side).

    Then change the 'Selection' field from 'Blue' to 'None'.

    Note, presumably this is still selecting, it will just not appear as selected if all you want is to avoid the UI effect.

提交回复
热议问题