Xcode14报错“Type ‘ChartDataSet‘ does not conform to protocol ‘RangeReplaceableCollection”

升级Xcode 14.3之后项目打包报错:

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 {
}

猜你喜欢

转载自blog.csdn.net/watson2017/article/details/130608484
今日推荐