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
2010-08-21 21:01:26
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
2010-08-22 08:23:13