views:

50

answers:

1

Hey guys, I'm in a Tab Bar Application and I have a tableView that's loaded from an array, and it works fine. (I don't have a TableViewController though).

The problem I'm having is that I want to reload the table view every time the user clicks on the tab icon. So I put [tableView reloadData] in viewWillAppear, but I get an error message because tableView isn't declared at this point. This is happening because I'm not actually declaring tableView, the methods that populate it do.

If I try declaring tableView in my .h, I get warnings about several different variables called tableView, and it doesn't work.

So does anyone know how to reload a tableView without declaring it in the .h file?

Thanks!

A: 

OK Figured it out! I wasn't updating my datasource, the array, in viewDidAppear. I was doing it in viewDidLoad... Thanks!

Elton