This error seems common, but I can't seem to find a similar root cause as mine so the solutions aren't working.
I initially had single View Controller (VC 1) in my app, embedded in a Navigation Controller (NC).
I then added a second VC 2 and removed the NC from the VC 1. Then I embedded VC 2 in a NC and made it the initial view controller.
VC 2 is a Table View Controller that, when a cell is tapped:
- instantiates VC 1,
- alters a variable, and
- uses navigationController to push VC 2
VC 2 contains a webView that does most of the work.
After setting all this up, I got a breakpoint and a warning that:
“View Controller“ is unreachable because it has no entry points, and no identifier for runtime access via -[UIStoryboard instantiateViewControllerWithIdentifier:].
I added a new NC back to VC 1 thinking that would fix things, but it didn't. Just changed to
“Navigation Controller“ is unreachable because it has no entry points, and no identifier for runtime access via -[UIStoryboard instantiateViewControllerWithIdentifier:].
Not sure if this is enough information, but is there a potentially clear solution here?
Edit: Adding the didSelectRowAt function in VC 2 that takes you to VC 1, in case it helps:
override func tableView(_ tableView: UITableView, didDeselectRowAt indexPath: IndexPath) {
if let vc = storyboard?.instantiateViewController(withIdentifier: "Browser") as? ViewController {
vc.selectedWebsite = websites[indexPath.row]
vc.approvedWebsites = websites
navigationController?.pushViewController(vc, animated: true)
}
}