1

Does anyone know how to determine when horizontal scrolling has stopped within a compositional layout group?

I'm using UICollectionView with compositional layout and multiple groups. One group has horizontal scrolling. From most sources I've found, UIScrollViewDelegate methods can be used, but that only seems to work for vertical scrolling.

Danny Sung
  • 373
  • 3
  • 8
  • You may want to look at this discussion here: https://stackoverflow.com/questions/59674538/uicollectionview-compositionallayout-not-calling-uiscrolldelegate – DonMag Apr 30 '21 at 16:46

1 Answers1

-3

A UICollectionView is a subclass of UIScrollView. You should be able to set yourself up as the collection view's delegate and (not UICollectionViewDelegate, mind, but delegate.) You can then receive callbacks like scrollViewDidEndDecelerating and scrollViewDidEndScrollingAnimation.

Duncan C
  • 128,072
  • 22
  • 173
  • 272