Skip to content

Instantly share code, notes, and snippets.

@yonivav
Last active April 1, 2019 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yonivav/98337fe400e49ef0001b93e16a7969ad to your computer and use it in GitHub Desktop.
Save yonivav/98337fe400e49ef0001b93e16a7969ad to your computer and use it in GitHub Desktop.
let dataSource = RxTableViewSectionedReloadDataSource<CustomSection>(
configureCell: { [weak self] _, tableView, indexPath, viewModel in
guard let cell = tableView.dequeueReusableCell(withIdentifier: CustomTableViewCell.reuseIdentifer, for: indexPath) as? CustomTableViewCell else { return UITableViewCell() }
cell.viewModel = viewModel
cell.disposeBag = self?.disposeBag // Bad idea, don't do this!
return cell
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment