-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
conform to 'RxCollectionViewDataSourceType' #376
Comments
me too |
Same here...what is even weirder is that it works in one project and fails in another project |
error view but successed controller |
same, any workaround? |
I was having this issue, but was fixed by instead of having a DataSource of type
|
me too :( |
I think your property's type or return type of function in viewModel is not Section type. |
still getting the same error.. i'm confused |
same error for RxTableViewSectionedAnimatedDataSource: |
maybe the the type of // this is wrong because it's Observable<[String]>, not Observable<[MyCustomSection]>.
// if you write like this, you will get the error tip.
let data = Observable<[String]>.just(["first element", "second element", "third element"])
// Observable<[MyCustomSection]> is what it wants: array of CustomSection
let section = MyCustomSection(header: "1", items:["first element", "second element", "third element"])
let data = Observable<[MyCustomSection]>.just([section])
let dataSource = RxTableViewSectionedReloadDataSource<MyCustomSection>(
configureCell: { ds, tv, ip, item in
let cell = tv.dequeueReusableCell(withIdentifier: "cell", for: ip)
cell.textLabel?.text = "Item \(item)"
return cell
}
)
data.bind(to: tableView.rx.items(dataSource: dataSource)).disposed(by: disposeBag) |
I am a stranger to RxDataSources,when I set the datasource to UICollectionView, got the error:
Instance method 'items(dataSource:)' requires that 'CollectionViewSectionedDataSource<NoticeList>' conform to 'RxCollectionViewDataSourceType'
code:
The text was updated successfully, but these errors were encountered: