I am stuck with the following code:
I am trying to build a segue between a table view and a detail view with an attached json file
error: Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
What am I doing wrong?
Code:
// This code is for the transfer to the next page
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = storyboard?.instantiateViewController(withIdentifier: "ActionDetailViewController") as? ActionDetailViewController
let action = result?.data3[indexPath.row]
vc?.ActionTitleDetail.text = action?.actionTitle
self.navigationController?.pushViewController(vc!, animated: true)
Also I need help to use more details from the json file on the detail view besides the elements in the table view.
Thanks