I am using the SWRevealViewController library for a side menu within my main view. I am trying to perform a segue from the main view (the one with the Nav Bar I want to be passed over to the next view) instead on the rear view (the one with the menu table), so I am trying to perform a segue using that view controller instead of 'self'. However, I am getting an error saying that the segue with identifier does not exist (it does).
override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
switch indexPath.row {
case 0:
print("case 0")
ViewController().goToView("to_playlist")
break
default:
break
}
}
class ViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate, UITableViewDataSource, UITableViewDelegate {
func goToView(a: String) {
performSegueWithIdentifier(a, sender: self)
}
}
Can somebody please let me know how I can do this?
Thanks.