This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
viewModel | |
.btnTitle | |
.drive(btn.rx.title(for: .normal)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ = Observable<Int>.interval(1, scheduler: MainScheduler.instance) | |
.subscribe(onNext: { _ in | |
print("Rx Resource count \(RxSwift.Resources.total)") | |
}) |
NewerOlder