I am working on an iOS app.
There is a viewController A that perfoms a segue programmatically to a detail viewController D.
On that detail viewController D the user may change some information that should be updated when clicking the back button to viewController A.
On viewController A I have included this function:
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
determineMyCurrentLocation()
print("reloading data")
downloadJSONFavoritos {
print("reloading viewwillappear")
self.collectionViewFavoritos.reloadData()
}
}
My issue is that this function is not always called when back to viewController A, and then the information in A is not updated as it should.