title: Perform Segue from Button in TableViewCell
body: <p>I have a CustomCell class that has a button. I am using a prototype cell (not a .xib). I would like to have the button in a tableviewcell perform a segue and pass a value to a new class. How do I create a unique action for a button in a tableviewcell? Thanks!     </p>
  
  <pre><code>    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
  
      ...
  
      selectedAreaCode = areaCodes[indexPath.row]
  
      // Configure Cell
      cell.areaCodeButton.setTitle(areaCode, forState: UIControlState.Normal)
  
  
      cell.areaCodeButton.addTarget(self, action: "segue", forControlEvents: UIControlEvents.TouchUpInside)
  
      cell.selectionStyle = UITableViewCellSelectionStyle.None
  
  
      return cell
  }
  
  func segue() {
  
      self.performSegueWithIdentifier("toDialer", sender: self)
  }
  
  override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
  
      if(segue.identifier == "toDialer") {
  
          let nextViewController = (segue.destinationViewController as! PhoneDialer)
          nextViewController.passedAreaCode = selectedAreaCode
      }
  }
  </code></pre>