2
votes

I have a following set up:

The third view controller is a push segue where I want to insert all client informations. After I click "Dodaj" it saves all data into CoreData and pops the current view. Unfortunatelly it doesn't reload data in TableViewController. If I go back and click again on menu to get to the TableViewController data are reloaded.

I need it to reload before the last ViewController pops. Any help?

I've already tried

[self.navigationController popViewControllerAnimated:YES];
    [self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:1] animated:YES];

to pop view controller. I don't know how to reload data using [self.tableView reloadData] in another viewcontroller. Please help!

Best, Bartosz

1
How are you saving the data? How are you setting the data source?WolfLink

1 Answers

2
votes

If you always need to reload data in a tableview in any view controller, the easiest is to add [self.tableView reloadData] in viewWillAppear.

If you want to selectively reload data, find out more on using delegates.