UICollectionView doesn't bounce when datasource has only 1 item

前端 未结 2 1283
谎友^
谎友^ 2021-02-06 20:39

I have a UICollectionView with a custom UICollectionViewFlowLayout. It scrolls horizontally and only shows one item at a time (full height). I have pagingEnabled = YES so that i

2条回答
  •  旧巷少年郎
    2021-02-06 21:20

    Thanks for @VaporwareWolf ,the answer is correct. I want to add a supplement that:

    DO NOT forget setting the bounces property to YES at the same time(through storyboard or your code).

提交回复
热议问题