I am having an unexpected problem passing var's through Segue to a VC. Worked fine in Objective C and early version of Swift. Here is what I am doing:
I'm extracting a set of variables from a downloaded json file to populate a TableViewCell, then to pass the Cell displayed variables plus the other vars relating to that Cell selection to a DetailViewController. This is through prepare for Segue, setting up vars on the DetialViewController. Then destination.myVarToSend = myVar .....
That all works fine.
However, I want to pass on two of those variables from the DetailVC to a ThirdViewController. I set it all up as before, but I get a nil in the variable on the ThirdViewController?? Any ideas? Is there something I am missing?
The ThirdViewController is actually a MapView and the vars I am passing are Double. Attempts at passing those did not work so at the moment I am experimenting and trying to do the same with String vars. (Of course I changed the data in the json file to text strings).
I'm not posting any code at the moment as it is all standard stuff, but can do if required. :-)
Many thanks
I just found the answer on a similar question which works fine for me, at : How do you pass data between view controllers in Swift?