iPhone - Is it ok to override UITableViewCell setSelected:animated

后端 未结 1 942
不思量自难忘°
不思量自难忘° 2021-01-14 02:08

I am drawing custom UITableViewCells. My cells are opaque and are completely drawn in the drawRect of the cell to help with performance. I want to handle the look of a sel

1条回答
  •  伪装坚强ぢ
    2021-01-14 02:41

    You can override -[UITableViewCell setSelected:animated:], but you should always call the super's implementation in your implementation. Not doing so could have have unanticipated effects on other selection-related behaviors.

    If you don't want the superclass to make any styling changes as a result of the selection, just set the cell's selectionStyle property to UITableViewCellSelectionStyleNone.

    0 讨论(0)
提交回复
热议问题