iPhone, why isn't UITableView reloadData working?

Jules picture Jules · Oct 1, 2010 · Viewed 12.7k times · Source

I've enclosed a screen dump to make things easier to follow.

I've attached my outlets for datasource and delegate and I've created an outlet for my table view, but reloadData doesn't work?

Ideally I'd like to only call reloadData after the view has been loaded once?

alt text

Answer

Yannick Compernol picture Yannick Compernol · Oct 1, 2010

Create a property for your UITableView and use the property as your IBOutlet, using the ivar directly isn't the way to do it. Hook things up again and debug it, to see if your UITableView isn't nil.

Put a breakpoint in the UITableView datasource methods to see if they get called, if they are, check if your transactionsArray actually contains items.

If this doesn't help, you'll have to provide more info like which methods are being called and more code.