title: override func prepare(for segue: UIStoryboardSegue, sender: Any?) not working properly
body: <p>I have a question regarding <code>override func prepare for segue</code>. I have a table view controller that has a <code>UINavigationController</code> and a button from another view controller that connects to the UINav as a "present modally" with identifier as "fakeButtonPressed".</p>
  
  <p>My question is that when I add this code into my view controller for when the button is pressed, it throws an error:</p>
  
  <blockquote>
    <p>"unrecognized selector sent to instance 0x7f9c784018f0"</p>
  </blockquote>
  
  <p>in console. Not sure why it's not working.</p>
  
  <p>Trying to get to AddPlayerViewController > UINavigationController > AddPlayerTableViewController.</p>
  
  <pre><code>override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
      if segue.identifier == "fakeButtonPressed"{
          let navigationController = segue.destination as! UINavigationController
          let controller = navigationController.topViewController as! AddPlayerTableViewController
      }
  }
  </code></pre>