I have a question: how to properly implement such a scenario in Rx-way with RxDataSources:
We have a class with UICollectionView (or UITableView, in my case it's collection view), the results are not immediately present, they come asynchronously after some time.
I have implemented my model with sections according to the tutorial here: https://github.com/RxSwiftCommunity/RxDataSources
But the data is created only once with just
there:
let sections = [
SectionOfCustomData(header: "First section", items: [CustomData(anInt: 0, aString: "zero", aCGPoint: CGPoint.zero), CustomData(anInt: 1, aString: "one", aCGPoint: CGPoint(x: 1, y: 1)) ]),
SectionOfCustomData(header: "Second section", items: [CustomData(anInt: 2, aString: "two", aCGPoint: CGPoint(x: 2, y: 2)), CustomData(anInt: 3, aString: "three", aCGPoint: CGPoint(x: 3, y: 3)) ])
]
Observable.just(sections)
.bindTo(collectionView.rx.items(dataSource: dataSource))
.addDisposableTo(disposeBag)
What to do in case my items are available after some time and I want my collection view to be updated automatically?
Thanks for any help.