비전공자 개발일기

this class is not key value coding-compliant for the key OOO 본문

SWIFT/(SWIFT || Xcode)Error

this class is not key value coding-compliant for the key OOO

HiroDaegu 2023. 1. 3. 17:53
728x90
SMALL

storyboard로 layout을 구성하고, 코드에 연결하고,
테스트를 위해 어플을 실행하는 과정에서 아래와 같은 에러가 발생

<terminal>
*** Terminating app due to uncaught exception 'NSUnknownKeyException', 
reason: '[<UITableViewCell 0x13b82b800> setValue:forUndefinedKey:]: 
this class is not key value coding-compliant for the key key이름.

<AppDelegate>
Thread 1: "[<UITableViewCell 0x13401f400> setValue:forUndefinedKey:]: 
this class is not key value coding-compliant for the key key이름.

해결 과정

1. 해당 key이름이 선언된 storyboard 및 코드 확인

해당 코드

위의 사진이 정상적으로 연결이 잘 된 상태인데
꽉찬 원이 아닌, 가운데가 비어있는 상태인 것을 확인

-> 제대로 연결이 안되어 있거나 한 곳에 여러 개가 연결되어 있어 빈 원이 발생

2. 제대로 연결된 것을 확인한 후 재실행 결과 정상 작동

분명히 제대로 연결했는데 가운데가 비어있는 상태가 보일 경우

 

Custom Class가 제대로 입력되어 있는지 점검해보기

728x90
LIST