UICollectionView with Search Header and Pull To Refresh

The idea is to have a search view in the UICollectionView and still be able to use pull to update using the UIRefreshControl. Search and UIRefreshControl will not be displayed until the user scrolls through the UICollectionView list.

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

I tried to implement SearchView in the header of the UICollectionView section, but this way I cannot use reloadData, while the collection view cell is the first responder.

A good solution should make it possible:

  • Refresh the CollectionView data source as the user types in the search field
  • Do not mix UIRefreshControl animation
+8
ios objective-c uicollectionview
source share
1 answer

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

-3
source share

All Articles