Open SumiaFish opened 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)
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)