I have a method used to save an image when the user clicks Save.
I use performSelectorInBackground to save the image, the viewcontroller is popped and the previous viewcontroller is shown.
I want the table (on the previousUIViewController) to reload its data when the imagesaving is done.
How can I do this?
The save method is called like this:
[self performSelectorInBackground:@selector(saveImage) withObject:nil];
[self.navigationController popViewControllerAnimated:YES];
In your
saveImagemethod, post a notification just after finishing saving the image and before returning from the method. Something like this:In the controller handling the table, implement
and in its
viewDidLoadmethod add the following code to register for notifications:finally, unregister in the
deallocmethod adding