Which is the best way to change the color/view of disclosure indicator accessory view in a table view cell in iOS?

前端 未结 12 1999
有刺的猬
有刺的猬 2020-12-04 10:26

I need to change the color of the disclosureIndicatorView accessory in a UITableViewCell. I think there are two ways to get this done, but I\'m not

12条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-04 10:35

    In iOS 13+ the disclosure indicator is set via a non-templeted UIImage, which is determined by the user's dark mode preference. Since the image is non-templated, it will not respect the cell's tintColor property. In other words, the dark mode preference has top priority. If you don't wan't to use the disclosure indicator derived by iOS, you will have to use a custom image.

提交回复
热议问题