I am trying to navigate from one Storyboard to another Storyboard. Here is my code -
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let controller = storyboard.instantiateViewController(withIdentifier: "detail") as! detailsArticle
controller.jsonData = json2["post"]
self.navigationController!.pushViewController(controller, animated: true)
However, when I try to navigate after clicking the button which runs the above code, I get exception error:
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file
How do I solve this?