Я начал изучать swift и rxswift, и у меня есть часть tableview
У меня есть этот код
private func setUpBindings() {
table.register(UINib(nibName: "InjectablesTableViewCell", bundle: nil), forCellReuseIdentifier: String(describing: InjectablesTableViewCell.self))
table.rx.setDelegate(self).disposed(by: disposeBag)
injectables.bind(to: table.rx.items(cellIdentifier: "InjectablesTableViewCell", cellType: InjectablesTableViewCell.self)) { (row, injectables, cell) in
cell.cellInjectables = injectables
}.disposed(by: disposeBag)
viewModel
.injectables
.observeOn(MainScheduler.instance)
.bind(to: self.injectables)
.disposed(by: disposeBag)
}
, который, как я понимаю, покрывает / заменяет функцию источника данных tableview:
tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int
tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
как я могу сделать то же самое или с помощью функции rxswift для функции редактирования ячеек
tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath)