I want to create a segue from (a) a UIButton (in a custom cell of a tableview) and (b) a custom cell in general to a UIViewController. The custom cell is specified in a .xib file. I read that I just should control drag from the UIButton / custom cell to the UIViewController. That doesn't work for me.
Thanks!
EDIT: I'm using a UITableViewController as Source, the destination is a UIViewController with a UITableView.
Ctrl-drag from the tableViewController (not from the prototype cell) to your target viewController and assign an identifier name to the segue.
Now override didSelectRowAtIndexPath
to perform the segue with your identifier when tapping that cell:
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath)
{
performSegueWithIdentifier("yourSegue", sender: nil)
}
Distinguish between the cells based on your indexPath and create as many segues as you need to your target viewControllers.
You can do similar for the button in your custom cell. Perform the segue on the button's action.