Reputation: 1245
So I have UITableView -> UITableViewCell and in my UITableViewCell have UICollectionView. It contains dishes On the top, I also have cell with CollectionView with horisontal scroll. It contains categories
And I want to move categories when I Scroll dishes. I try to catch scroll event in UITableViewCell class(that contains collectionView)
extension ProductCollectionViewCell:UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, UIScrollViewDelegate{
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
startScroll()
}
func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) {
startScroll()
}
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
startScroll()
}
func scrollViewDidScroll(_ scrollView: UIScrollView) {
if scrollView == productsCollectionView && productsModel.count != 0 {
startScroll()
}
}
}
But nothing of this event was catched=( The doesn't call. It only calls on Controller with UiTableView. How can I make it?
Upvotes: 0
Views: 163
Reputation: 1245
So yes. As Ptit Xav Sad - it is inpossible to catch. I chenged all screen to collectionView
Upvotes: 1