I'm trying to pass data to the second view controller without success,
This is my code:
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: “secondVC")
self.present(vc, animated: true, completion: nil)
//The following solution as I checked in the previous questions doesn't work:
vc.Var1InSecondViewController = self.var1
vc.Var2InSecondViewController = self.var2
It claims that 'vc' which is related to the second view controller has no member of 'Var1InSecondViewController' even though I did created it in the second view controller.
Your help would be appreciated, thank you.