title: Open new VC when TableViewCell is pressed
body: <p>I'm going to try to explain this as well as I can, so please bear with me. </p>
  
  <p>I have a table view populated with cells, I am trying to make it so when the <code>tableViewCell</code> is pressed it opens a VC with the details of the object described by the cell. I thought I got it working, but I noticed that if you back out of the new VC back to page with the <code>tableView</code> then press another cell, it does a transition as though it was going to a new page, but it still shows the page with the table view until you touch the screen (anywhere)</p>
  
  <p>I was told it may not be a good idea to initialize a new VC within the function as I have done below as it may cause an increase of memory use, but whenever I try to initialize it anywhere else I get nothing but errors. I'm genuinely stuck.</p>
  
  <p>Please note that the reason why I'm not using the built in segue function xCode provides is because this is a custom animation, so any solution which does away with the custom animation will not work.</p>
  
  <p>It's very frustrating to have something almost working, but then little details break it. Any recommendations are appreciated, Thank you (code below)</p>
  
  <pre><code>func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      let exerciseDetailsVC = storyboard?.instantiateViewController(withIdentifier: "ExerciseDetailsVC") as! ExerciseDetailsVC
      exerciseDetailsVC.exerciseIndex = indexPath.row
      presentDetail(exerciseDetailsVC)
  }
  </code></pre>
  
  <p>EDIT: Requested presentDetail function</p>
  
  <pre><code> func presentDetail (_ viewControllerToPresent: UIViewController){
      let transition = CATransition()
      transition.duration = 0.2
      transition.type = CATransitionType.push
      transition.subtype = CATransitionSubtype.fromRight
  
      self.view.window?.layer.add(transition, forKey: kCATransition)
  
      present(viewControllerToPresent, animated: false, completion: nil)
  }
  </code></pre>