HGPlaceholders icon indicating copy to clipboard operation
HGPlaceholders copied to clipboard

不能和 RxSwift 一起使用

Open ghost opened this issue 6 years ago • 1 comments

placeholderTableView = tableView as? TableView
placeholderTableView?.tableFooterView = UIView()
placeholderTableView?.placeholderDelegate = self
placeholderTableView?.dataSource = nil
placeholderTableView?.placeholdersProvider = .default
placeholderTableView?.showNoResultsPlaceholder()
placeholderTableView?.reloadData()

// 使用 Rx 配置 tableView 数据时崩溃,似乎是已存在 dataSource 的问题。
viewModel.data.asObservable().share().bind(to:
    tableView.rx.items(cellIdentifier: "Cell")
) { (row, model, cell) in
    cell.textLabel?.text = model.oper_name
}.disposed(by: viewModel.bag)

如何解决?

ghost avatar May 02 '18 15:05 ghost

我也遇到一样的问题

evan-cai avatar May 11 '18 02:05 evan-cai