I using a tableView inside a viewController. I am trying to send data to a detailViewController. But for some reason i can't push to the detail view. I am not getting any errors. Its just not working.
Here is my code for the segue:
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject) {
if (segue.identifier == "test") {
let detailViewController: DetailViewController = segue.destinationViewController as DetailViewController
//println(index)
detailViewController.fromPreviousView = index
//
}
You registering tableView cell programatically , So it will create different cell not the one in the storyboard so there is no segue.
Solution is delete this line of code self.tableViewOutlet.registerClass(UITableViewCell.self, forCellReuseIdentifier: "cell") and give cell identifier to the cell in story board to "cell". It will work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With