CombineCocoa
CombineCocoa copied to clipboard
When using UIScrollViewDelegateProxy and UICollectionViewDelegateProxy, one is ignored
Describe the bug When using UIScrollViewDelegateProxy and UICollectionViewDelegateProxy, one is ignored
code
let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout)
self.collectionView.didSelectItemPublisher.sink { _ in
print("not called")
}
.store(in: &self.cancellableSet)
self.collectionView.didEndDraggingPublisher.sink { _ in
print("called")
}
.store(in: &self.cancellableSet)
I'm running into this exact same thing except with UITableView instead of UICollectionView. I'm subscribed to the willBeginDraggingPublisher and didScrollPublisher of the table view, and also subscribed to the didSelectRowPublisher, and only the didSelectRowPublisher is firing. I previously also had an additional didSelectRowPublisher that was ignored. It seems that all publisher subscriptions but one are lost when we have multiple subscriptions on UIScrollView/UI(Table/Collection)View.