0

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.

User97693321
  • 3,336
  • 7
  • 45
  • 69
firer
  • 55
  • 1
  • 5
  • 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 Jul 31 '12 at 04:06
  • Agreed, we can't diagnose what's going wrong without seeing the source code. – Rob Jul 31 '12 at 04:10
  • 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 Jul 31 '12 at 04:41
  • I tried to reloadData after the view B viewDidDisappear, still no working – firer Jul 31 '12 at 05:37
  • I guess it relates to visibility of UITableView, but it's weird that is still not working after the view B dismissed. – firer Jul 31 '12 at 05:42

2 Answers2

0

Try putting your call to reloadData in viewWillAppear.

Sonny Parlin
  • 931
  • 2
  • 13
  • 28
0

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

Pandey_Laxman
  • 3,889
  • 2
  • 21
  • 39