[Xcode] Swift setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key

jess·2022년 11월 15일
0

Thread 1: "[<UICollectionViewCell 0x1247142d0> setValue:forUndefinedKey:]

이런 오류가 났다 ..

여기 체크를 안해줘서 그런거였음

문제는 실제로 뷰 컨트롤러의 모듈 정의와 관련이 있습니다. 
컨트롤러를 완전히 재생성하면 마법처럼 문제가 해결된 것처럼 
보이는 이유를 설명할 수 있을 것 같습니다. 
내 것에서는 모듈이 내 목표 중 하나로 설정되어 있어서, 
두 번째 목표를 실행했을 때 연결이 되지 않았다. 
대상이 여러 개인 경우 스토리보드에서 충돌하는 VC의 
Module 상자를 비우고 Inherit Module From Target
(대상으로부터 모듈 상속)을 선택합니다.

출처 : https://stackoverflow.com/questions/38308329/swift-setvalueforundefinedkey-this-class-is-not-key-value-coding-compliant-f

0개의 댓글