-performSegueWithIdentifier:
method is declared in UIViewController
. So you can't just call it in UITableViewCell
subclass.
You can add an action to that button when you are creating cell in -tableView:cellForRowAtIndexpath:
method. Then you can call -performSegueWithIdentifier:
method in that action method. Here is example assuming we are in UITableViewController
subclass:
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as UITableViewCell
cell.button.addTarget(self, action: "someAction", forControlEvents: .TouchUpInside)
return cell
}
And here is action method:
func someAction() {
self.performSegueWithIdentifier("moveToView", sender: self)
}