When I bind an ObservableCollection to a UICollectionView, the collection view is not being set up until I make some changes to my collection. The initial values of my collection are not being loaded to the collection view.
I've noticed in debugging that the RKCollectionViewDataSource.sourceCollection is empty, even though the observableCollection has items in it.
This is fixed by removing the skip(1) from observableCollection.skip(1).observe(on: ImmediateOnMainExecutionContext) { [weak self] event in on line 76 of UICollectionView.swift.
Why are we skipping the 1st observation anyways?
When I bind an
ObservableCollectionto aUICollectionView, the collection view is not being set up until I make some changes to my collection. The initial values of my collection are not being loaded to the collection view.I've noticed in debugging that the
RKCollectionViewDataSource.sourceCollectionis empty, even though theobservableCollectionhas items in it.This is fixed by removing the
skip(1)fromobservableCollection.skip(1).observe(on: ImmediateOnMainExecutionContext) { [weak self] event inon line 76 ofUICollectionView.swift.Why are we skipping the 1st observation anyways?