I am new to swift programming and running into errors with performing a segue from a tableview cell when it is pressed to a view controller giving details about that cell. T
From your comment:
. I have a button in the tabBarController that presents the tableView and this is working fine.
let drinkController = DrinkListTableViewController()
let drinkNavigationController = UINavigationController(rootViewController: drinkController)
self.present(drinkNavigationController, animated: true, completion: nil)
No it isn’t working fine. It is the problem.
Basically this is the same situation as in my answer here:
https://stackoverflow.com/a/40077530/341994
You are obtaining a useless instance when you say DrinkListTableViewController()
. What you need to do is talk to the storyboard and ask it to instantiate the desired view controller (by identifier) so that you get the instance from the storyboard, the one that has the segue.