Just updated to the newer FirebaseUI Pod - a few things have changed but one of the big ones is the way that the FUI Table View works. I had it working well on an older version but am struggling with this below - and the lack of documentation/examples.
self.dataSource = FUITableViewDataSource(query: <#T##FIRDatabaseQuery#>, view: <#T##UITableView#>, populateCell: <#T##(UITableView, IndexPath, FIRDataSnapshot) -> UITableViewCell#>)
I don't understand where the indexpath is being called from. Do I need to make a seperate NSIndexPath
to pass into that? I also don't really understand where this is supposed to live - previously, with it was FirebaseTableViewDataSource
, I would set it in my viewDidLoad
, and it would create the cells etc straight from that. It almost now looks as though it needs to live in my cellForRowAtIndexPath
. Does anyone have any advice on this?
The test for this latest version uses a tableView:bind: method (seems like a UITableView class extension they made) and I was able to get it to work.
Also make sure you are observing your query for changes or else the tableView won't get populated