Changing background color of selected cell?

后端 未结 30 2865
太阳男子
太阳男子 2020-11-29 00:22

Does anyone know how to change the background color of a cell using UITableViewCell, for each selected cell? I created this UITableViewCell inside the code for TableView.

30条回答
  •  温柔的废话
    2020-11-29 00:53

    For a solution that works (properly) with UIAppearance for iOS 7 (and higher?) by subclassing UITableViewCell and using its default selectedBackgroundView to set the color, take a look at my answer to a similar question here.

提交回复
热议问题