title: How to push a new view controller when a table cell is tapped?
body: <p>I have created this table with 3 sections and 7 rows. The code is shown below </p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
  
  @IBOutlet var subjectTabelView: UITableView!
  
  var slSubject = ["English Lang&amp;Lit", "Chinese Lang&amp;Lit", "Economics"]
  var hlSubject = ["Mathematics", "Chemistry", "Biology"]
  var tokSubject = ["Theory of Knowledge"]
  
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.
      subjectTabelView.dataSource = self
      subjectTabelView.delegate = self
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
  
  func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
      return 3
  }
  
  func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      if section == 0{
          return hlSubject.count
      }else if section == 1{
          return slSubject.count
      }else {
          return tokSubject.count
      }
  
  }
  
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
      let subjectCell = tableView.dequeueReusableCellWithIdentifier("idSubjectCell", forIndexPath: indexPath) as! UITableViewCell
  
      if indexPath.section == 0 {
          subjectCell.textLabel?.text = hlSubject[indexPath.row]
      } else if indexPath.section == 1{
          subjectCell.textLabel?.text = slSubject[indexPath.row]
      } else {
          subjectCell.textLabel?.text = tokSubject[indexPath.row]
      }
  
      return subjectCell
  }
  
  func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -&gt; String? {
      if section == 0 {
          return "HL"
      } else if section == 1{
          return "SL"
      } else {
          return "ToK"
      }
  }
  
  
  
  }
  </code></pre>
  
  <p>What do I have to do to make every cell in this table pushes a new view controller when it is tapped? The picture of my storyboard is shown below. In my storyboard, my view controller, I have already created a navigation controller, and made the view controller that has the table the rootViewController. And for now, my tableView has only one prototype cell and one cell identifier. </p>
  
  <p>Thank you!</p>