title: Changing View Controller Causing NSUnknownKeyException in XCode
body: <p>I'm using a navigation view controller that I've made in interface builder to make a side menu function in my app.</p>
  
  <p><a href="https://i.stack.imgur.com/ozyzv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ozyzv.png" alt="Here are the view controllers in my storyboard"></a></p>
  
  <p>The controller titled Menu View Controller is the menu that slides out when the button above "Home" is pressed in the controller titled home (the second one). The Menu View Controller is comprised of a table view and four table view cells, where each menu item is one cell. </p>
  
  <p>In my HomeViewController file I've written a switch statement, where each case is called when its corresponding menu item (table view cell) is pressed:</p>
  
  <p><a href="https://i.stack.imgur.com/0x6oX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0x6oX.png" alt="switch statement code"></a></p>
  
  <p>I am confident that each case is being called appropriately because the print statements are being written in the console when each cell is pressed. As you can see, in the case of ".my_dogs" I've written a constant- the view controller from the storyboard that is on the far right in the first picture. It just has a label constrained to the center.</p>
  
  <p>I believe that this constant is being instantiated properly, as these are the identities of the far right storyboard in the interface builder: </p>
  
  <p><a href="https://i.stack.imgur.com/C4kEi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C4kEi.png" alt="Identities"></a> </p>
  
  <p>The class "DogsViewController" is just the default swift file (with viewDidLoad() and no code in it).</p>
  
  <p><strong>Now here's the issue:</strong> When I comment out the <code>present(dogsViewController, animated: true)</code>, there is no crash when I tap the "My Dogs" table cell. When I add it, I get the following error:</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[&lt;Poochtime.DogsViewController 0x7fc60f916620&gt; setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key test.'
  </code></pre>
  
  <p>I've also tried <code>navigationController.pushViewController(dogsViewController, animated: false)</code>, and this made it so the program did not crash, but it gave me a different functionality that I desire. I need the far right view controller (dogs view controller) to take over the screen when the table cell "My Dogs" is pressed, and I need it to inherit the navigation controller properties like the title (the navigation title is "Home" on the second view controller and the menu button above the title.</p>