Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/116.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在iOS图表labelTextColor中使用自定义颜色_Ios_Swift_Ios Charts - Fatal编程技术网

在iOS图表labelTextColor中使用自定义颜色

在iOS图表labelTextColor中使用自定义颜色,ios,swift,ios-charts,Ios,Swift,Ios Charts,有人知道如何在iOS图表中使用labelTextColor获得自定义颜色吗?当我尝试插入自定义颜色时,标签就消失了。例如: 这项工作: self.chartView.leftAxis.labelTextColor = UIColor.cyanColor() 但像这样的事情并没有: self.chartView.rightAxis.labelTextColor = UIColor(red: 150, green: 202, blue: 56, alpha: 1) 替换 self.chartVi

有人知道如何在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, green: 202, blue: 56, alpha: 1)


谢谢,我现在明白了,这就是演示的意思。不知道为什么我不想试试。10分钟后我会接受答案。谢谢,我现在明白了,这就是演示的意思。不知道为什么我不想试试。10分钟后我会接受答案。