【问题标题】:UICollectionView with Search Header and Pull To RefreshUICollectionView 与搜索标题和拉刷新
【发布时间】:2013-09-08 08:56:09
【问题描述】:

这个想法是在 UICollectionView 中有一个搜索视图,并且仍然能够使用 UIRefreshControl 来使用 pull 刷新。 在用户向下滚动 UICollectionView 之前,搜索和 UIRefreshControl 将不可见。

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

我已经尝试将 SearchView 实现到 UICollectionView 的部分标题中,但是这样我不能在集合视图的单元格是第一响应者时使用 reloadData。

一个好的解决方案应该能够:

  • 在用户输入搜索框时更新 CollectionView 数据源
  • UIRefreshControl的动画别乱了

【问题讨论】:

  • 你有没有在这方面取得任何进展?

标签: ios objective-c uicollectionview


【解决方案1】:

使用滚动视图而不是处理 CollectionView。对于拉动刷新功能,您可以使用开源代码 https://github.com/kenzan8000/PullRefreshView

【讨论】:

  • 为什么不只是UIRefreshControl
  • 我只对涉及 UICollectionView 的解决方案感兴趣。
猜你喜欢
  • 2015-10-19
  • 1970-01-01
  • 2015-11-23
  • 1970-01-01
  • 1970-01-01
  • 2013-01-22
  • 2014-11-18
  • 2023-03-18
  • 1970-01-01
相关资源
最近更新 更多