Reputation: 35114
I want to get collectionView scroll even though only 2 items are contained in it. I want to implement UIRefreshControl
when pulling it. Any idea why it does not move?
Upvotes: 0
Views: 163
Reputation: 4795
Scroll views only scroll, if their content size is bigger then the currently visible frame.
You can still implement pull-to-refresh without using UIRefreshControl
, you just have to observe user's scroll event. The basic workflow is this:
scrollViewDidEndDragging(_:willDecelerate:)
delegate method to check the content offsetThis article contains a full example, check it out!
Upvotes: 1