0

I'm coding a little silly "Am I Alive" test for iOS, and I've encountered a strange problem with one of my View Controllers. When I link anything (Image Views, Buttons, etc.) to the View's corresponding Swift file, it throws,

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key X.'

Usually I get these errors when there's something funny with my connections, but I can't see what I've done wrong. I've even tried recreating the View Controller from the start. I have another View Controller running code as well, and it works fine. Maybe there's something I'm forgetting to do when I create the View Controller?

If you know of any other situations in which NSUnknownKeyException is thrown (Like not when you have a connection going to a place that doesn't exist), that might be what I've done.

Here are my project files: https://www.dropbox.com/sh/wofzrc730ij0cno/AAANw-JKvUnz0gqEEc8Mqn_2a?dl=0

JAL
  • 41,701
  • 23
  • 172
  • 300
  • You might have an outlet pointing to two separate view controllers. Remove all of your `IBOutlets` and recreate them. – JAL Mar 18 '16 at 18:21
  • @JAL There are initially no outlets in FinalController.swift. Simply adding one is causing problems. – Ariel Gans Mar 18 '16 at 19:14

0 Answers0