Closed cyupa closed 8 years ago
tableView.reloadData doesn't do the trick.
public func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
still isn't called even though numberOfSectionsInTableView
returns 1 and numberOfRowsInSection
returns 67.
Hi @cyupa,
I looked at your project and the issues seem to be happening because Storyboards does things differently.
One of this is that - (void)setupDatasource
is being called before the DATAStack setup has allocated all the things. Then self.tableView.dataSource = dataSource
is being set after the tableView
set up is finished.
I'll try adding a Storyboard example to reproduce your issues and find a way to fix them. Thanks for reporting this!
I haven't faced any of this issues myself because I don't use Storyboards on my projects. You can find an example of a Storyboard-less setup here:
https://github.com/hyperoslo/Sync/tree/master/Examples/DesignerNews
I'll try some stuff myself in the following days.
Hi @cyupa,
I've been trying to get this working but the main issue seems to be related to Storyboards. I would recommend to use this without Storyboards as a workaround. I hope that helps.
Best,
Demo on how to use this with Storyboards https://github.com/3lvis/StoryboardDATASourceAndDataStackDemo
👍 Thanks @3lvis
I'm trying DATASource in a project and it doesn't seem to work.
I setup the DATASource object accordingly:
But it seems that the tableView delegate methods (inside DATASource) are not called. calling
po dataSource.objectsCount
returns, as expected, 67.Project can be found here: https://github.com/cyupa/Codecamp-iOS UITableViewClass: SessionsTableViewController.