geri222
11/4/2018 - 9:44 AM

Passing data from ViewController to an other

//Section 13, Lecture 156

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
    if segue.identifier == "sceondScreen" {
        
        let destinationVC = segue.destination as! SecondViewController
        
        destinationVC.data = data
        
    }
}