UICollectionView doesn't bounce when datasource has only 1 item

前端 未结 2 1281
谎友^
谎友^ 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:07

    UICollectionView has the properties alwaysBounceHorizontal and alwaysBounceVertical. Setting the horizontal to YES did the trick.

提交回复
热议问题