Paging UICollectionView by cells, not screen

前端 未结 22 2057
予麋鹿
予麋鹿 2020-12-04 05:00

I have UICollectionView with horizontal scrolling and there are always 2 cells side-by-side per the entire screen. I need the scrolling to stop at the begining

22条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 05:47

    OK, so I found the solution here: targetContentOffsetForProposedContentOffset:withScrollingVelocity without subclassing UICollectionViewFlowLayout

    I should have searched for targetContentOffsetForProposedContentOffset in the begining.

提交回复
热议问题