tags:

views:

31

answers:

1

How is it possible to manually refresh a table everytime the table view controller is loaded. i want it to refresh every time the view controller is initialized. My app table only upgrades once the app is closed down and restarted>

+2  A: 

You may override viewWillAppear: method of your ViewController:

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

UPDATE: you should declare IBOutlet tableView in .h file and connect this outlet to the tableView in the Interface Builder.

kovpas
thanks this work however i cant put it under viewWillAppear as it says tableView undeclared. If i put it under didSelectRowAtIndexPath it refreshes once a cell was touched?so what should i do to make it refresh as u showed me at startup?
Alx