XCode14 Charts报错:Type 'ChartDat

2022-10-21  本文已影响0人  nick5683

XCode14 报错:
Unavailable instance method 'replaceSubrange(_:with:)' was used to satisfy a requirement of protocol 'RangeReplaceableCollection'
Type 'ChartDataSet' does not conform to protocol 'RangeReplaceableCollection'

解决方案:
// MARK: RangeReplaceableCollection
extension ChartDataSet: RangeReplaceableCollection 方法里补充

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

上一篇 下一篇

猜你喜欢

热点阅读