I know this question has been asked a million times, but I came across this problem and couldn't figure it out for the life of me, and all the previous examples only have unique code to their problem.
I have a viewcontroller, inside of which I have a tableview. I created a custom tableviewcell class and my problem: The cellforrowatindexpath, which is set up in the viewcontroller isn't even called. I've included the UITableViewDataSource and UITableViewDelegate protocols, but no results - my tableview shows up without any of the configurations (mainly populating the cells).
It's super simple, I just figured it out:
Go to the storyboard, select the tableview and ctrl-drag to the yellow box at the top of the view controller (This is a reference to the view controller itself). Then make sure to select both the delegate and datasource options (white dot to the left of the options indicates they're selected).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With