일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- uikit
- avcapturesession
- programmers
- ios 26
- Xcode
- CustomCode
- swift
- liquid glass style
- 2018 KAKAO BLIND RECRUITMENT
- Decodable
- Pod
- JSONParser
- Codable
- usb카메라연결
- 위클리챌린지
- ios외부카메라연결
- cocoapods
- JSON
- 정보처리기사 실기 요약본
- ios카메라유선연결
- AVFoundation
- IOS
- 정보처리기사
- Swipe Gesture
- UITableView
- parse
- 프로그래머스
- ios외부디바이스연결
- iOS 화면 가리기
- 정보처리기사 실기
- Today
- Total
iOS 개발일기
[Swift] Type 'ChartDataSet' does not conform to protocol 'RangeReplaceableCollection' 에러 해결 방법 본문
[Swift] Type 'ChartDataSet' does not conform to protocol 'RangeReplaceableCollection' 에러 해결 방법
맨날 까먹으니 적어두자 2024. 9. 25. 21:31
pod 업데이트 후 Charts 라이브러리에 에러가 발생하여 확인해보니 프로토콜을 준수하지 않는다고 합니다.
두번째 에러 내용을 보고 'replaceSubrange(_:with:)' 메소드를 추가하여야 된다 생각하여 메서드 내 작성할 내용을 알아보기 위해 검색을 해본 결과
public func replaceSubrange<C>(
_ subrange: Swift.Range<Index>,
with newElements: C
) where C : Collection, Element == C.Element {
entries.replaceSubrange(subrange, with: newElements)
notifyDataSetChanged()
}
위와 같이 작성하여 추가해주면 된다는 것을 확인했습니다.
참조
https://stackoverflow.com/questions/74010925/charts-not-compile-on-xcode-14
Charts not compile on Xcode 14
I am facing following errors in library - Type 'ChartDataSet' does not conform to protocol 'RangeReplaceableCollection' Unavailable instance method 'replaceSubrange(_:with:)' was used to satisfy a
stackoverflow.com
Charts/Source/Charts/Data/Implementations/Standard/ChartDataSet.swift at c3701a4e5ce111c29dd7af9e19e6a346ccf0ad52 · ChartsOrg/C
Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart. - ChartsOrg/Charts
github.com
'iOS > 에러 모음집' 카테고리의 다른 글
[Xcode] Sandbox: rsync.samba 에러 해결 방법 (2) | 2024.10.03 |
---|---|
[Xcode]`PBXGroup` attempted to initialize an object 에러 해결 방법 (0) | 2024.09.29 |
[Xcode] xcode-select: error: tool 'xcodebuild' requires Xcode 에러 해결 방법 (0) | 2024.09.29 |
[Xcode] SDK does not contain 'libarclite' 에러 및 아카이브 에러 해결 방법 (1) | 2024.09.24 |
[Xcode] M1 환경에서 발생하는 pod update 에러 해결 방법 (0) | 2022.03.18 |