this class is not key value coding-compliant for the key result. - Error

I am making a very simple app that has 2 View Controllers connected by a Navigation Controller. My second View Controller has no content in it .

But I am getting the following Error:

Thread 1: "[<quiz__2.ViewController 0x7fad26005700> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key result."

I also having multiple buttons leading to the same View Controller

How can I fix this?

Replies

How can I fix this?

That may happen when an IBOutlet connection to result exists in the storyboard. Do you know how to see all the connection of the storyboard? You may need to remove the wrong connection and re-connect it.

  • Yes I have noticed and removed the connection.

Add a Comment

Could you show the code and tell exactly where you get the error ?

You have removed the connection : of what to what ?

But you should create the connection from objects in IB to its IBOutlet. And do an option-clean build forlder once done.

I had this same issue, which I resolved by removing unwanted or extra connections which you are not using in the storyboard. For me, this error generally occurred as I copied all the storyboards from one project and pasted them into the new project, and changed the component names and actions but forgot to remove the old names and actions for the UI Components in the storyboard.