개발/iOS
[iOS] 에러 해결 - setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key
모K
2021. 8. 16. 18:39
스토리보드상에서 뷰컨트롤러와 outlet 연결하고 나~중에 해당 outlet 변수의 이름을
'passwordInput' -> 'pwdInput' 으로 바꾸기만 했더니 이런 에러가 발생했다.
Thread 1: "[<MangoPlate_Client_clone.LoginViewController 0x14c8062b0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key passwordInput."
해결 방법은 아주아주 간단하다!
코드 위에서 이제 안쓰는 변수를 지울 뿐만 아니라 스토리보드에서도 해당 참조를 지워줘야한다.
그러니 스토리보드에서 아래 사진처럼 !(주의) 표시되어있는 커넥션을 삭제해주자!