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.'
Well I went through the attached file and I think this might be the problem:
let vc0 = UIViewController(nibName: "ViewControllerDays", bundle: nil)
You are instantiating a
UIViewController when it should have been
So that is why it fails at runtime as its trying to access it as a
UIViewController which does not have any of these properties.
And this happens in a lot of places. You need to init with the proper view controller class.