9
votes

The idea is to have a search view into a UICollectionView and still be able to use pull to refresh with UIRefreshControl. The search and the UIRefreshControl will not be visible until the user scroll down the UICollectionView.

------------------
| Pull To Refresh |
------------------
|      Search     |
------------------    <--- Above of this line the content is hidden
|    A   |   B    |
------------------
|    C   |   D    |
------------------
|     Footer      |
------------------

I have tried implement the SearchView into an section header of the UICollectionView, but in this way I can not use reloadData while a cell of the collection view is the first responder.

A good solution should make possible to:

  • Update the CollectionView datasource while the user type into the search box
  • Don't mess the animation of the UIRefreshControl
1
did you ever make any progress on this? - topwik

1 Answers

-3
votes

Use a scrollView instead of dealing with CollectionView. For the pull to refresh functionality you can use an open source as https://github.com/kenzan8000/PullRefreshView.