title: ViewController with a tableview to another view controller
body: <p>I want to select a row and then index this to another view controller. I have created a function which is "didselectrow" however this is not navigating me to the next view controller. Any solutions or help would be much appreciated. </p>
  
  <p>import UIKit
      import CoreData</p>
  
  <pre><code>class CoreViewController: UIViewController, UITableViewDelegate, 
  UITableViewDataSource {
  
  @IBOutlet var tableView: UITableView!
  
  var users : [Users] = []
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
  
      tableView.dataSource = self
      tableView.delegate = self
  
      // Do any additional setup after loading the view.
  }
  
  //view the data on the table view appear 
  
  override func viewDidAppear(_ animated: Bool) {
  
      // get data 
      getData()
  
      //reload data
      tableView.reloadData()
  }
  
  
  func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return users.count
  }
  
  func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
  
      let cell = UITableViewCell()
      let user  = users[indexPath.row]
  
      if user.isimportant
      {
          cell.textLabel?.text = "\(user.username!)"
      }
      else
      {
          cell.textLabel?.text = user.username! //entity name in textlabel
      }
      return cell
  
  }
  
  func getData()
  {
      let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext
  
      do{
          users  = try context.fetch(Users.fetchRequest())
      }
      catch {
          print ("Fetching Failed ")
      }
  
  }
  
  func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
  
      let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext
      if editingStyle == .delete
      {
          let user = users[indexPath.row]
          context.delete(user)
  
          (UIApplication.shared.delegate as! AppDelegate).saveContext()
  
          do{
              users  = try context.fetch(Users.fetchRequest())
          }
          catch {
              print ("Fetching Failed ")
          }
      }
      tableView.reloadData()
  }
  
  
  func tableView(_ tableView: UITableView, didDeselectRowAt indexPath: QuestionsViewController) {
      performSegue(withIdentifier: "questionview", sender: nil)
  }
  
  
  
  
  /*
  // MARK: - Navigation
  
  // In a storyboard-based application, you will often want to do a little preparation before navigation
  override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
      // Get the new view controller using segue.destinationViewController.
      // Pass the selected object to the new view controller.
  }
  */
  
  }
  </code></pre>