Open view with object
<p>I have a class with <code>tableView</code> and <code>didSelectRowAtIndexPath</code> method. I created 2 objects to send to <code>init</code>. I want to change NSUSERDEFAULT by object. But my problem is: At the end of the method, how can I open another <code>view</code>?</p>

<pre><code>func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {

    let indexPath = indexPath.row
    NSUserDefaults.standardUserDefaults().setInteger(indexPath, forKey:"INDEX")
    NSUserDefaults.standardUserDefaults().synchronize()

    if(posicionSegmented() == 0){
        NSUserDefaults.standardUserDefaults().setBool(true, forKey: "CARTERAEMPRESAS")
        let ficha = FichaEmpresa(estadoSegmented: true)
    }else{
        let ficha = FichaEmpresa(estadoSegmented: false)
        NSUserDefaults.standardUserDefaults().setBool(false, forKey: "CARTERAEMPRESAS")
    }

    //self.performSegueWithIdentifier("SegueFichaEmpresa", sender: self)
}
</code></pre>

<p>Thanks.</p>

<p><strong>EDIT</strong></p>

<p>I have to change view (and class) sending my bool. </p>