解决方案有两种
方法一 -> 新建一个UILabel类, 继承UILabel, 然后重写 setBackgroundColor: 方法, 在这个方法里不做任何操作, 让UILabel的backgroundColor不发生改变.
写在最后, 感谢参考的出处:
StackOverflow: UITableViewCell makes label's background clear when highlighted
方法一 -> 新建一个UILabel类, 继承UILabel, 然后重写 setBackgroundColor: 方法, 在这个方法里不做任何操作, 让UILabel的backgroundColor不发生改变.
写在最后, 感谢参考的出处:
StackOverflow: UITableViewCell makes label's background clear when highlighted
转载于:https://juejin.im/post/5a3238976fb9a0450909880f