Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableView not actually reloading it's data even though datasource methods are returning the new data

I have a tableview controller where the data for this table comes in from HTTP requests. When new data comes in (which should be reflected as new rows in my table), but when I call

[self.tableView reloadData]

nothing changes in the table. No new rows! I have log statements in my datasource methods confirming that after I call reloadData, the table asks how many rows and sections to draw. My controller for sure returns the new number of rows like it should, but the table doesn't seem to care. I also checked to make sure my cellForRow... method returned a proper instance of the cell that has been configured with the proper data object. I've never had this problem before!

I'm running iOS 4.2 in the simulator with an iPad app built for 4.2.

like image 448
Samuel Goodwin Avatar asked Nov 05 '22 01:11

Samuel Goodwin


1 Answers

Perhaps you may have more than one tableview? You could print pointers of the table from the didSelectRowAtIndexPath: and cellForRowAtIndexPath: delegate methods. Including the description of your self.tableView could also shine some light on the issue.

like image 67
Matt Matteson Avatar answered Nov 10 '22 06:11

Matt Matteson