简体   繁体   English

即使滚动时如何将节标题保持在顶部:UICollectionView

[英]How to keep section header at the top even when we scroll: UICollectionView

I found this tutorial how to make section for collection view. 我发现本教程如何为集合视图制作部分。 I want to achieve the same effect like in table view when we see section every time on the top even if we scroll table. 每次滚动顶部时,我都希望在顶部看到部分时达到与表格视图相同的效果。

I just pick the first library found on google looking what you want: CSStickyHeaderFlowLayout 我只是选择在Google上找到的第一个库,以查找所需内容: CSStickyHeaderFlowLayout

You have a lot of more library available and open source. 您有更多可用的库和开源。 So, just search a little bit next time, you will find easily your happy ending! 因此,下次再搜索一点,您将轻松找到您的幸福结局!

Also, if you don't want to use an external library, you can follow this tutorial . 此外,如果您不想使用外部库,则可以按照本教程进行操作 You will get your goal with it. 你将实现你的目标。

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

相关问题 滚动UICollectionView时如何在顶部屏幕上自定义标题视图? - How to custom header view that sticky in top screen when scroll UICollectionView? 将 UICollectionView 滚动到部分标题视图 - Scroll UICollectionView to section header view 如何滚动uitableview和顶部的节标题,可见并滚动到 - how to scroll uitableview, and section header in the top, visible and scroll to 单击标题部分滚动到顶部 - Clicked Header Section is scroll to top Swift 2.0 UITableView Section Header在点击时滚动到顶部 - Swift 2.0 UITableView Section Header scroll to top when tapped iOS UICollectionView水平滚动,如何像UITableView中的部分一样将标题设置为水平滚动 - iOS UICollectionView horizontal scroll, how to set the header to be scroll horizontal like the section in UITableView 即使删除节数据并重新加载UICollectionView之后,节头仍然存在 - Section header persists even after removing section data and reloading UICollectionView 如何使UICollectionView在将项目添加到顶部时不滚动 - How to make UICollectionView not scroll when and item is added to the top UICollectionView:如何将一节中的项目保持在一行中? - UICollectionView: How to keep the items of a section in a single row? UICollectionView显示每个部分的滚动指示符(标题zIndex已损坏) - UICollectionView showing scroll indicator for every section (header zIndex broken)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM