I have UITabViewController and two UIViewControllers. I use storyboards and segues. In the first VC. I get data from Firebase and save it. Then I need to pass this data to another vc in order to change the text of UILabel in the second vc. Thank you
func fetchCeloriesData() {
refWorkout = workout!.title
Database.database().reference().child("programs").child(refWorkout).child("calories").observeSingleEvent(of: .value) { (snapshot) in
let caloriesData = snapshot.value as! String
print(caloriesData)
// self.dietVC.BurnedLabel.text? = caloriesData
}
}