0
votes

I just encouter a problem, that I call UITableView reloadData method, but nothing happened. No tableView:numberOfRowsInSection is called.

The scenario is:

Table works fine in view A (has the UITableView), then view B shows and hide, after this step, the UITableView reloadData is not working anymore. I am sure reloadData is called in main UI thread and the data source has been changed. Also NO IBOutlet connection issue.

2
your question couldn't be any more vague. do post some code or give some explanation as to what you have done. - Nitin Alabur
Agreed, we can't diagnose what's going wrong without seeing the source code. - Rob
My guess is, If the view B is in above the view A(has the UITableView) then the reloadData won't work, Just try removing the view B from it's superview. - Shanmugaraja G
I tried to reloadData after the view B viewDidDisappear, still no working - firer
I guess it relates to visibility of UITableView, but it's weird that is still not working after the view B dismissed. - firer

2 Answers

0
votes

Try putting your call to reloadData in viewWillAppear.

0
votes

Set BreakPoint on [tableView reloadData]; check that your tableView object is not nil.