有谁知道如何在 iOS 图表中使用自定义颜色来使用 labelTextColor?当我尝试插入自定义颜色时,标签就消失了。例如:
这个有效:
self.chartView.leftAxis.labelTextColor = UIColor.cyanColor()
但是像这样的东西不会:
self.chartView.rightAxis.labelTextColor = UIColor(red: 150, green: 202, blue: 56, alpha: 1)
最佳答案
替换
self.chartView.rightAxis.labelTextColor = UIColor(red: 150, green: 202, blue: 56, alpha: 1)
与
self.chartView.rightAxis.labelTextColor = UIColor(red: 150.0/255, green: 202.0/255, blue: 56.0/255, alpha: 1)
关于ios - 在 iOS 图表中使用自定义颜色 labelTextColor,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38422505/