Animating UICollectionView contentOffset does not display non-visible cells

后端 未结 7 2099
旧巷少年郎
旧巷少年郎 2021-02-01 18:31

I\'m working on some ticker-like functionality and am using a UICollectionView. It was originally a scrollView, but we figure a collectionView will make it easier

7条回答
  •  一向
    一向 (楼主)
    2021-02-01 18:47

    I suspect that UICollectionView is trying to improve performance by waiting until the end of the scroll before updating.

    Perhaps you could divide the animation up into chucks, although I'm not sure how smooth that would be.

    Or maybe calling setNeedsDisplay periodically during the scroll?

    Alternatively, perhaps this replacement for UICollectionView will either do want you need or else can be modified to do so:

    https://github.com/steipete/PSTCollectionView

提交回复
热议问题