UITableView tap to deselect cell

前端 未结 14 1753
野性不改
野性不改 2020-12-16 10:37

I have a UITableViewCell that is selected when tapped. During this selected state, if the user taps the cell again, I want the cell to deselect.

I can\

14条回答
  •  粉色の甜心
    2020-12-16 11:36

    I think that using the blue selection colouring for toggling may give a strange impression. Why not use an accessory like a checkmark? This is a much more familiar technique for selection toggling (be it multi-cell or single-cell).

    See this answer for info: UITableView Multiple Selection

提交回复
热议问题