- Turn your data into an Observable sequence
- Bind the data to the tableNode / collectionNode using :
- rx.items(dataSource:protocol<RxASTableDataSourceType, ASTableDataSource>)
let dataSource = RxASTableSectionedReloadDataSource<SectionModel<String, Int>>(
configureCellBlock: { (_, _, _, num) in
return {
let cell = ASTextCellNode()
cell.text = "\(num)"
return cell
}
})
Observable.just([SectionModel(model: "title", items: [1, 2, 3])])
.bind(to: tableNode.rx.items(dataSource: dataSource))
.disposed(by: disposeBag)
To run the example project, clone the repo, and run pod install
from the Example directory first.
RxDataSources-Texture is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'RxDataSources-Texture'
$ make project
$ open RxDataSources-Texture.xcworkspace
OhKanghoon, ggaa96@naver.com
RxDataSources-Texture is available under the MIT license. See the LICENSE file for more info.