The following code passes variables to destVC, and it works. But when I close destVC the variables clean up. Is there any way to save these variables?
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let destVC = segue.destination as? ViewControllerGpsMaps {
if (baseCoordinatesSaveNow == true) {
destVC.baseCoordinatesSaveNow = true
}
destVC.actualDestinationLatitude = Double(waypointlatitude.text!)
destVC.actualDestinationLongitue = Double(waypointlongitude.text!)
}
}