CombineCommunity / CombineCocoa

Combine publisher bridges for UIKit
MIT License
1.67k stars 133 forks source link

UICollctionView did not work as expected. When I use colltionView to listen to both didScollPublish and didSelectedItemPublisher #77

Open SumiaFish opened 2 years ago

SumiaFish commented 2 years ago

UICollctionView did not work as expected. When I use colltionView to listen to both didScollPublish and didSelectedItemPublisher, they will not work at the same time and the first declaration will not work.

Simple case is as follows:

// NotWork collectionView.didScrollPublisher.sink { [weak self] _ in OMPrint("didScroll NotWork!" ) } .store(in: &cancellables)

// Work collectionView. DidSelectItemPublisher. Sink {indexPath in OMPrint("didSelectItem Work!" ) } .store(in: &cancellables)