views:

191

answers:

1

Hi

My Application have navigation controller and table views. When the back button is clicked and the view is popped out from controller stack, i noticed that the table events are not executed (eg: cellForRowIndexPath). Is there anyway that these events are execueted when view is popped out.

This is the code i use for pushing the view into controller stack.

MyViewController *obj = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil]; [self.navigationController pushViewController:obj animated:YES]; [obj release];

Regards Sandy

A: 

You can use the ViewWillAppear and ViewWillDisappear methods.

what you want to do is put a call to

[theTable reloadData];

which initiates all of the calls that you wanted.

This call should be placed where you want the table to reload - either on appear or disappear.

Good Luck !