NSUnknownKeyException this class is not key value coding-compliant for the key
"this class is not key value coding-compliant for the key pause" usually means you have a referencing outlet problem. Look in the Connections Inspector for your different buttons. You may likely either have:
2 referencing outlets for one button and the program does not know which ne to use, etc.
I ran the code hooking up 1 label to an IBOutlet and three buttons (play, pause, reset), one to each IBAction, and it ran perfectly.
this class is not key value coding-compliant for the key table Swift 3
Usually this happens when you connect an IBOutlet in InterfaceBuilder, then delete the code that defines the outlet.
The problem is that the Storyboard/XIB file tries to use KVC (Key Value Coding) to reference the property of the view controller for the outlet, but it's no longer there, so the KVC call crashes.
Look through your storyboards/xibs for a scene/view controller that has an outlet "table" that no longer exists.
How to fix Error: this class is not key value coding-compliant for the key tableView.'
You have your storyboard set up to expect an outlet called tableView
but the actual outlet name is myTableView
.
If you delete the connection in the storyboard and reconnect to the right variable name, it should fix the problem.
This class is not key value coding-compliant for the key error in Swift
See: Thread 1: signal SIGABRT Xcode 6.1
You have to go into Interface Builder and look for the one (or more) outlets that have a warning triangle (follow the link for a screenshot). Once you delete those bad connections, you're either (1) ready to go because you have already connected your new objects or (2) you need to make the new connections so that you have all the elements loaded properly and you have no warning triangles.
App is crashing with error: this class is not key value coding-compliant for the key tableView. How to fix?
Apparently something is wrong in your nib file. Try to remove all connections first between the tableView
and other views. That means all outlets (IBOutlet
) and actions (IBAction
). Most likely the crash will be gone. Afterwards you can try to reconnect outlets and actions again, but make sure to do it correctly. Cause the error states that you are making a connection to a class with tableView
, but it does not have a key (property) called tableView
. So you might try to make a connection with the wrong class / object.
Uncaught exception: This class is not key value coding-compliant
This is normally caused by a link from your storyboard to a non existent property. Double check all the links from objects in your storyboard. Also if you have changed the name or spelling of a property or method it can still have a reference to the old one.
Related Topics
Handling Push Notifications When App Is Terminated
iOS 9 Segue Causes App to Freeze (No Crash or Error Thrown)
How to Disable Floating Headers in Uitableview with Uitableviewstyleplain
Send a File as Attachment in Objective C
Making a Phone Call in an iOS Application
Changed Project Name in Xcode Causing Naming Error
How to Round Corners of Uiimage with Hexagon Mask
Spritekit - Not Loading @3X Images from Sktextureatlas
Objective-C Get a Class Property from String
How to Run Nstimer in Background Beyond 180Sec in iOS 7
Adding Blur Effect to Background in Swift
Why Is Uicollectionviewcell's Outlet Nil
Change String Color with Nsattributedstring
Ios7 iPad Landscape Only App, Using Uiimagepickercontroller