UICollectionView does not scroll

前端 未结 3 2002
清酒与你
清酒与你 2020-12-13 17:18

I have a UICollectionView set up with a UICollectionViewDataSource that currently provides six items. These are fewer than needed to fill the scree

3条回答
  •  有刺的猬
    2020-12-13 17:47

    bounces, despite it's name, isn't the right property to set. You also need to set alwaysBounceVertical and / or alwaysBounceHorizontal. From the documentation:

    If this property is set to YES and bounces is YES, vertical dragging is allowed even if the content is smaller than the bounds of the scroll view. The default value is NO.


    Note the confusing name in IB .. https://stackoverflow.com/a/18391029/294884

提交回复
热议问题