I want to do something when the user steps back in the navigation controller (iOS)

I have a table view here and you want to update the interface when the user clicks the back button in the navigation controller. How can i do this?

+5
source share
2 answers

There are many ways to do something like this.

  • ViewWillDisappear implementation
  • ViewWillAppear implementation
  • Set up a delegate for your navigation and respond to changes.
  • Make your own feedback button that links to your own function.
  • Use NSNotification when moving

Any of the above is a good starting place.

+8
source

!

- ?

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [[self tableView] reloadData];
}
+3

All Articles