Xcode升级后,Char框架报错,解决方案(Type ‘ChartDataSet‘ does not conform to protocol ‘RangeReplaceableCollection)

错误提示:Type ‘ChartDataSet’ does not conform to protocol ‘RangeReplaceableCollection’

解决方案如下:

extension ChartDataSet: RangeReplaceableCollection方法添加代码

 public func replaceSubrange<C>(_ subrange: Swift.Range<Int>, with newElements: C) where C :
 Collection, ChartDataEntry == C.Element {
    }

此时运行就不会报错了


版权声明:本文为qq_37523448原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。