Jules
Jules

Reputation: 7776

iphone, I'm returing from a pushed view, which event do I reload my table data in?

I'm returning to my table view after selecting a new date range, I now need to reload the data in my table, which event do I do this in ?

Heres how I'm pushing my date selection sreen.

MyViewController *nextController = [[[MyViewController alloc] initWithNibName:@"MyView" bundle:nil] autorelease];
MyAppDelegate *delegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate];
[delegate.MyNavController pushViewController:nextController animated:YES];

Upvotes: 0

Views: 88

Answers (1)

Thomas Clayson
Thomas Clayson

Reputation: 29935

to go back to the last view you need:

[self.navigationController popViewControllerAnimated:YES];

and then in viewWillAppear:(BOOL)animated of the tableviewcontroller you want to do:

[self.tableView reloadData];

Upvotes: 3

Related Questions