4thSpace 4thSpace - 1 year ago 65
Swift Question

Why isn't cellForRowAtIndexPath fired but other methods are?

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

is never called. What would cause this behavior?

Answer Source

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.