0

numberOfSectionsInTableView and numberOfRowsInSection are both called on my table. The array I'm using has 3 items in it.

cellForRowAtIndexPath is never called. What would cause this behavior?

4thSpace
  • 43,672
  • 97
  • 296
  • 475

1 Answers1

2

Might be something to do with the dimensions of your tableView. See this other answer for details. Basically, what is says is that if your tableView is too small, then the cellForRowAtIndexPath method is never called. Try making your tableView smaller, or decreasing the size of your header or footer of the tableView. If this doesn't work, try reloading the table using tableView.reloadData() on the main thread.

Community
  • 1
  • 1
brimstone
  • 3,370
  • 3
  • 28
  • 49
  • Yes. After taking the tableview out of the StackView, cellForRowAtIndexPath is called and I see data loading in the UI. – 4thSpace Apr 17 '16 at 04:36