Katedral Pillon
Katedral Pillon

Reputation: 14864

numberOfRowsInSection called multiple times but cellForRowAtIndexPath never called

I am tracking my code using NSLog at every minute state. For whatever reason numberOfRowsInSection is being called in an endless look, returning 1 correctly; but cellForRowAtIndexPath is never called. Any ideas what might cause this?

My table and the ViewController are laid out entirely using storyboard. This is the first time I am encountering this problem. Normally whether I use magic numbers or not, if numberOfRowsInSection is called then cellForRowAtIndexPath will be called. Why not this time? [self.tableView reloadData]; is supposed to trigger them both.

Upvotes: 0

Views: 839

Answers (1)

Dávid Kaszás
Dávid Kaszás

Reputation: 1877

You forgot to set the TableView's DataSource.

Upvotes: 0

Related Questions