UIRefreshControl on UICollectionView only works if the collection fills the height of the container

前端 未结 7 1317
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-02 05:35

I\'m trying to add a UIRefreshControl to a UICollectionView, but the problem is that the refresh control does not appear unless the collection view

7条回答
  •  余生分开走
    2020-12-02 05:52

    If your collectionview has a content size big enough to scroll vertically, it's OK, but in your case it's not.

    You must enable the property AlwaysBounceVertical, so you could set self.collectionView.alwaysBounceVertical = YES;

提交回复
热议问题