title: How to make a segue by a tableViewDelegate
body: <p>I'd like to create a segue from a tableViewDelegate cell to an other view. This is my code:</p>
  
  <pre><code>import UIKit
  
  class CoriViewController: UIViewController, UITableViewDelegate, UITableViewDataSource
  {
      @IBOutlet var tableView: UITableView!
  
  var elencoCori : SquadraModel! //This var contains label and array
  
  override func viewDidLoad()
  {
      super.viewDidLoad()
  
      self.tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell")
  
      InterfaceManager.sharedInstance.putBlurBackgroundToTableView(self.view, tableView: self.tableView)
      self.tableView.tableFooterView = UIView(frame:CGRectZero)
      self.tableView.backgroundColor = UIColor.clearColor()
  }
  
  override func didReceiveMemoryWarning()
  {
      super.didReceiveMemoryWarning()
  }
  
  func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int
  {
      return self.elencoCori.cori.count
  }
  
  func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell
  {
      let cell : UITableViewCell = self.tableView.dequeueReusableCellWithIdentifier("cell") as! UITableViewCell
      let coro = elencoCori.cori[indexPath.row]
      cell.textLabel?.text = coro.marker
      cell.backgroundColor = UIColor.clearColor()
      cell.accessoryType = UITableViewCellAccessoryType.DisclosureIndicator
  
      return cell
  }
  
  func tableView(tableView: UITableView, didDeselectRowAtIndexPath indexPath: NSIndexPath)
  {
      self.performSegueWithIdentifier("toDettaglioController", sender: self)
          tableView.deselectRowAtIndexPath(indexPath, animated: true)
      }
  }
  </code></pre>
  
  <p>Now the problem: how I could set a prepareForSegue that send to the secondView? In other circumstances I would have solved the problem like this:</p>
  
  <pre><code>override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?)
  {
      if segue.identifier == "toDettaglioController"
      {
          if let indexPath = tableView.indexPathForSelectedRow()
          {
              let controller = segue.destinationViewController as! Dettaglio controller
              controller.coro = elencoCori.cori[indexPath.row]
          }
      }
  }
  </code></pre>
  
  <p>but I know the this doesn't work and I have to use a delegate method. So can everyone help me with a step-by-step guide?</p>