Skip to content

Instantly share code, notes, and snippets.

@yonivav
Created February 20, 2019 20:42
Show Gist options
  • Save yonivav/d78ec999931258b29e34dcb440c2c041 to your computer and use it in GitHub Desktop.
Save yonivav/d78ec999931258b29e34dcb440c2c041 to your computer and use it in GitHub Desktop.
private let dataSource = RxTableViewSectionedReloadDataSource<TableViewSection>(
configureCell: { [weak self] _, table, indexPath, viewModel in
guard let cell = table.dequeueReusableCell(withIdentifier: TableViewCell.reuseIdentifier, for: indexPath) as? TableViewCell else {
return UITableViewCell()
}
cell.viewModel = viewModel
cell.disposeBag = self.disposeBag // Bad Idea, don't do that!
return cell
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment