I have an XCode project with a main storyboard and main ViewController. There are then 4 sub classes/xib files which can be swiped as pages. This is all working fine, but as soon as I add a label and link it up as an IBOutlet the app does not build successfully and I get this error:
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7ff7cc0953b0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key daysCountDaysLabel.'
I've been stuck on this for hours and followed solutions from 10 or so similar (and resolved!) posts on Stack Overflow without it working for me.
Things I have tried:
- Making sure there are no IBOutlets that don't match labels
- Removing all the labels/IBOutlets, testing it works and then adding a new label and matching up to an IBOutlet (which then doesnt work)
- Cleaning the build
- Checking the source for the .xib files to see if there any old outlets etc
- Making sure class names match up
- Stopping myself posting on Stack Overflow with something that seems easy to fix as there are so many other resolved posts with the same issue (sorry)
I have zipped up the project and placed here in case anyone can identify and solve the issue: http://expirebox.com/download/87ccb8b70612ef3c86a447ff5eb8d728.html