I am trying to figure out how to fix this issue in Swift and I am also having this error: "fatal error: unexpectedly found nil while unwrapping an Optional value". Any suggestion appreciated. Thanks.
From FirstViewController
func getDatafromSecondViewController(myMessage: String){
println(myMessage)
}
From SecondViewController
func sendThisDataToFirstViewController() {
let firstViewController = FirstViewController()
firstViewController.getDatafromSecondViewController("Testing")
}
Note: I cannot use prepareForSegue because I am using those files "class FirstViewController: UIViewController" and "class SecondViewController: NSObject" as an example.