简体   繁体   English

当内容高度小于高度时,SVPullToRefresh无法与UICollectionView一起使用

[英]SVPullToRefresh not working with UICollectionView when content height is less than the height

I'm using SVPullToRefresh to enable pull to refresh in UICollectionView . 我使用SVPullToRefresh拉功能使能在刷新UICollectionView But I find a problem with it. 但是我发现有问题。 Suppose my collection view size is 320(width) x 300(height) then if content size height of collection view less than the height than the pull to refresh view is not working. 假设我的集合视图的大小为320(宽度)x 300(高度),那么如果内容大小的高度小于集合视图的高度,则该高度小于刷新视图的高度。 Means, when I am trying to drag down (pull down the collection view) it'll not drag the pull area and not even show pull to refresh view. 就是说,当我尝试向下拖动(向下拉集合视图)时,它不会拖动拉动区域,甚至不会显示拉动刷新视图。

What can be a work around for this? 有什么可以解决的呢? I tried updating collection view's content size but it doesn't help. 我尝试更新集合视图的内容大小,但无济于事。

I think setting 我认为设置

self.collectionView.alwaysBounceVertical = YES;

will do the trick. 会成功的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM