Reputation: 29
I'm using RxSwift, RxCocoa for my app and implemented a tableView.
When It got priceData from viewModel for tableView, it showed full list of priceData.
But I want to show only 50 counts at the first time and show more when I scroll it.
Without RxSwift/RxCocoa, I used numberOfRowsInSection for paging of tableView.
But I don't know how I can use this with RxSwift
Here is my code. what should I do with my code for making to pageable tableView?
viewModel.priceData
.drive(tableView.rx.items(cellIdentifier: "Cell")) { (index: Int, list, cell: Cell) in
...
}.disposed(by: disposeBag)
Upvotes: 1
Views: 921
Reputation: 33979
The RxDataSources
library allows you to section your data. Add it to your project and you can use sections.
Upvotes: 1