I have a `UITableViewController` and a custom `TableViewCell` and within that UITableViewCell there is a UISwitch. This switch is wired to an IBAction, but as soon as i tap the switch, i get an error: 

```
 unrecognised selector sent to instance 0x13ce30a50

```

**SelectFriendsViewController.swift**

```
class SelectFriendsViewController: UITableViewController, SelectorDelegate {
    func selectUser(string: String) {
        selectedUser = string;
    }

    .... lots of code removed for simplification.

    override func tableView(tableView: UITableView?, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

        let cell:SelectorTableViewCell = tableView!.dequeueReusableCellWithIdentifier("MyCell", forIndexPath: indexPath) as SelectorTableViewCell;

        cell.delegate = self;
    }

}

```

---

```
protocol SelectorDelegate {
    func selectUser(string: String)
}

class SelectorTableViewCell: UITableViewCell {

    @IBOutlet var swUser: UISwitch! = UISwitch();
    @IBOutlet var lblUserName: UILabel! = UILabel();

    var delegate: SelectorDelegate!

    @IBAction func SwitchUser(sender: UISwitch) {
        //delegate.selectUser("test");
        //even with just this println i get the error
        println("test");
    }

}

```