I have 3 viewControllers:
VcA: I read data with observers from database and pass with segue to VcB.
VcB: I read data and display it, with a button I call VcC to update data passing data with segue.
VcC: a STATIC tableview in which I update data and save them.
The problem is that when I dismiss after saved VcC and go back in VcB all data is old, even if in firebase all data are perfectly updated.
In VcB for example I read the Title like this:
var groupName: String?
than in didAppear:
Name.title = groupName
Anyway if I also go back from VcB to VcC all data of the table are the old data.
To be more clear:
I call the database in VcA
click the name in the table and pass the data to Vcb, all is fine for now, title and other vars are ok
now I click EDIT and call to VcC, the table where I update the data, make change and save,
after save VcC dismiss and I go back to VcB -> title is still p2 but in firebase not!
I click again on EDIT to return to VcC (the edit table), title is the old one
I think that I have to recall data from db... anyway to do it without refresh the data from firebase?
I know that if I go back to VcA after save all is fine but I really need to go to VcB, how can I do?
I found many threads, this is the most similar but not exact situation... Reload tableView after dismiss a viewController